diff options
author | Teddy Wing | 2020-09-22 19:53:47 +0200 |
---|---|---|
committer | Teddy Wing | 2020-09-22 19:58:59 +0200 |
commit | f24ce22393920e0b5ccfc23139281e88c42224a5 (patch) | |
tree | d2b193bb591b10b12cdeab15b9507b250f93ff01 /vimrc | |
parent | 18dacd037f756066a92972687b53d5ce94d2c96b (diff) | |
download | dotvim-f24ce22393920e0b5ccfc23139281e88c42224a5.tar.bz2 |
vimrc: Add i_^r^f mapping to insert the current filename
Since this removes the path and extension, it makes it easier to use
than `<C-r>%` when I want to insert a title or symbol based on the
file's name.
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -464,6 +464,9 @@ " 2020.09.10: " * Make the quickfix window 10 lines tall in vim-go. " +" 2020.09.22: +" * Add i_^r^f mapping to insert the current filename. +" " Pathogen @@ -859,6 +862,9 @@ nnoremap <leader>gp :!git log -p -- %<cr> nnoremap <leader>cf :call system('pbcopy', expand('%'))<cr> nnoremap <leader>cF :call system('pbcopy', expand('%:p'))<cr> +" Insert the current file name +inoremap <C-r><C-f> <C-r>=expand('%:t:r')<CR> + " Save the current session to a file nnoremap <leader>mk :mksession! vimsession<cr> |