mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Add :Read ex command & 'SPC i p' keybind
This can be used to extract paths from evil-ex style paths. e.g. the following inserts the stdout into the current buffer (assuming we're in ~/some/project/filename.c): :R!echo %:P ~/some/project :R!echo %:t filename.c :R!echo %:e c :R!echo %:r filename :R!echo ~/another/project/%:t:r.h ~/another/project/filename.h :R % contents of current file http://vimdoc.sourceforge.net/htmldoc/cmdline.html#filename-modifiers has a full list of vim filename modifiers. Doom doesn't support all of them, but it does support most of them.
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
;;; Custom commands
|
||||
;; Editing
|
||||
(evil-ex-define-cmd "@" #'+evil:macro-on-all-lines) ; TODO Test me
|
||||
(evil-ex-define-cmd "R[ead]" #'+evil:read)
|
||||
(evil-ex-define-cmd "al[ign]" #'+evil:align)
|
||||
(evil-ex-define-cmd "ral[ign]" #'+evil:align-right)
|
||||
(evil-ex-define-cmd "enhtml" #'+web:encode-html-entities)
|
||||
|
Reference in New Issue
Block a user