mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
feature/evil: abbreviate :P filename modifier
This commit is contained in:
@ -87,7 +87,7 @@ flags. See http://vimdoc.sourceforge.net/htmldoc/cmdline.html#filename-modifiers
|
||||
(unless global 1)))))
|
||||
("P"
|
||||
(let ((default-directory (file-name-directory (expand-file-name path))))
|
||||
(doom-project-root)))
|
||||
(abbreviate-file-name (doom-project-root))))
|
||||
(_ path))
|
||||
"")))
|
||||
;; 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 "%:s?e?x?") "fxature/test-evil.el"))
|
||||
(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"))
|
||||
(file-truename buffer-file-name)))))
|
||||
|
||||
|
Reference in New Issue
Block a user