feature/evil: abbreviate :P filename modifier
This commit is contained in:
parent
e32a804f1d
commit
a71ca4d340
2 changed files with 2 additions and 2 deletions
|
@ -87,7 +87,7 @@ flags. See http://vimdoc.sourceforge.net/htmldoc/cmdline.html#filename-modifiers
|
||||||
(unless global 1)))))
|
(unless global 1)))))
|
||||||
("P"
|
("P"
|
||||||
(let ((default-directory (file-name-directory (expand-file-name path))))
|
(let ((default-directory (file-name-directory (expand-file-name path))))
|
||||||
(doom-project-root)))
|
(abbreviate-file-name (doom-project-root))))
|
||||||
(_ path))
|
(_ path))
|
||||||
"")))
|
"")))
|
||||||
;; strip trailing slash, if applicable
|
;; strip trailing slash, if applicable
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
(should (equal (do-it "%:~") "~/.emacs.d/test/modules/feature/test-evil.el"))
|
(should (equal (do-it "%:~") "~/.emacs.d/test/modules/feature/test-evil.el"))
|
||||||
(should (equal (do-it "%:s?e?x?") "fxature/test-evil.el"))
|
(should (equal (do-it "%:s?e?x?") "fxature/test-evil.el"))
|
||||||
(should (equal (do-it "%:gs?e?x?") "fxaturx/txst-xvil.xl"))
|
(should (equal (do-it "%:gs?e?x?") "fxaturx/txst-xvil.xl"))
|
||||||
(should (equal (do-it "%:P/") (doom-project-root)))
|
(should (equal (do-it "%:P/") (abbreviate-file-name (doom-project-root))))
|
||||||
(should (equal (file-truename (do-it "%:p"))
|
(should (equal (file-truename (do-it "%:p"))
|
||||||
(file-truename buffer-file-name)))))
|
(file-truename buffer-file-name)))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue