Added ,cn to copy name of current file into system clipboard

This commit is contained in:
yan
2012-04-14 16:40:50 -07:00
parent d2448921b5
commit ebc1ea9cc7
2 changed files with 3 additions and 1 deletions

View File

@@ -351,7 +351,8 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke
#### Utility
* `,ig` - toggle visual indentation guides
* `,cf` - Copy Filename of current file into system (not vi) paste buffer
* `,cf` - Copy Filename of current file (full path) into system (not vi) paste buffer
* `,cn` - Copy Filename of current file (name only, no path)
* `,vc` - (Vim Command) copies the command under your cursor and executes it in vim. Great for testing single line changes to vimrc.
* `,yw` - yank a word from anywhere within the word (so you don't have to go to the beginning of it)
* `,ow` - overwrite a word with whatever is in your yank buffer - you can be anywhere on the word. saves having to visually select it

View File

@@ -158,6 +158,7 @@ imap <silent> <C-J> <% %><Esc>2hi
" copy current filename into system clipboard - mnemonic: (c)urrent(f)ilename
" this is helpful to paste someone the path you're looking at
nnoremap <silent> ,cf :let @* = expand("%:~")<CR>
nnoremap <silent> ,cn :let @* = expand("%:t")<CR>
"Clear current search highlight by double tapping //
nmap <silent> // :nohlsearch<CR>