nvim: Change path copy mapping
Changed mapping to copy path from `yf` to `yp`/`yP`. Two reasons: I might be better able to remember 'yank-path' when saying it in my head as a mnemonic, and with the `yf` mapping set I could only yank things *to* some letter `yt<letter>` not including some letter `yf<letter>` and it has been very subtly annoying me ever since I introduced the mapping. Fixed now. Also added two variations: `yp` will yank the whole path into the `p` register, and `yP` will only yank the filename itself. Here's to remembering the new mapping!
This commit is contained in:
parent
9a1efff30c
commit
a49e49bbd4
1 changed files with 3 additions and 2 deletions
|
@ -56,8 +56,9 @@ map.i.nore['<C-l>'] = '<esc>guiw`]a'
|
||||||
map.c.nore['w!!'] =
|
map.c.nore['w!!'] =
|
||||||
[[execute 'silent! write !sudo tee % >/dev/null' <bar> edit!]]
|
[[execute 'silent! write !sudo tee % >/dev/null' <bar> edit!]]
|
||||||
|
|
||||||
-- yank filename to f buffer
|
-- yank current filename/filepath to f buffer
|
||||||
map.n.nore['yf'] = ':let @f = expand("%")<cr>'
|
map.n.nore['yp'] = ':let @p = expand("%")<Cr>'
|
||||||
|
map.n.nore['yP'] = ':let @p = expand("%:p")<Cr>'
|
||||||
|
|
||||||
-- repeat the last substitute command with all its flags preserved
|
-- repeat the last substitute command with all its flags preserved
|
||||||
map.n.nore['&'] = ':&&<cr>'
|
map.n.nore['&'] = ':&&<cr>'
|
||||||
|
|
Loading…
Reference in a new issue