Add vim shortcut: copy the relative path of a file
I've been using ,cf for some of the time, but sometimes I don't want the full path for a variety of reasons: - any command where relative path suffices (running tests, removing files) - the full path won't work if I'm using MacVim and the project is within vagrant cli
This commit is contained in:
parent
17800c6ecd
commit
5125d393f7
@ -131,6 +131,7 @@ imap <silent> <C-J> <% %><Esc>2hi
|
|||||||
" copy current filename into system clipboard - mnemonic: (c)urrent(f)ilename
|
" copy current filename into system clipboard - mnemonic: (c)urrent(f)ilename
|
||||||
" this is helpful to paste someone the path you're looking at
|
" this is helpful to paste someone the path you're looking at
|
||||||
nnoremap <silent> ,cf :let @* = expand("%:~")<CR>
|
nnoremap <silent> ,cf :let @* = expand("%:~")<CR>
|
||||||
|
nnoremap <silent> ,cr :let @* = expand("%")<CR>
|
||||||
nnoremap <silent> ,cn :let @* = expand("%:t")<CR>
|
nnoremap <silent> ,cn :let @* = expand("%:t")<CR>
|
||||||
|
|
||||||
"Clear current search highlight by double tapping //
|
"Clear current search highlight by double tapping //
|
||||||
|
Loading…
Reference in New Issue
Block a user