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:
parent
ad2b905330
commit
46bea60ad3
3 changed files with 10 additions and 2 deletions
|
@ -468,10 +468,11 @@
|
|||
|
||||
;;; <leader> i --- insert
|
||||
(:prefix-map ("i" . "insert")
|
||||
:desc "From clipboard" "y" #'+default/yank-pop
|
||||
:desc "Evil ex path" "p" (λ! (evil-ex "R!echo "))
|
||||
:desc "From evil register" "r" #'evil-ex-registers
|
||||
:desc "Snippet" "s" #'yas-insert-snippet
|
||||
:desc "Unicode" "u" #'unicode-chars-list-chars)
|
||||
:desc "Unicode" "u" #'unicode-chars-list-chars
|
||||
:desc "From clipboard" "y" #'+default/yank-pop)
|
||||
|
||||
;;; <leader> n --- notes
|
||||
(:prefix-map ("n" . "notes")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue