aboutsummaryrefslogtreecommitdiffstats
path: root/vimrc
diff options
context:
space:
mode:
authorTeddy Wing2015-08-18 18:01:57 -0400
committerTeddy Wing2015-08-18 18:01:57 -0400
commit535123759ff48e22e4e3063160c8c407e5886094 (patch)
tree95450a6e2b2c48ff0925aba77147b4273d2468eb /vimrc
parentffbb7b89a763c60f981340d6c8d110e8b7240169 (diff)
downloaddotvim-535123759ff48e22e4e3063160c8c407e5886094.tar.bz2
vimrc: Add mapping to copy current file path
Copy the current file's path with `pbcopy` to make it faster to perform operations on the current file in another shell window.
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc6
1 files changed, 6 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index 3e7e2b9..40d20f0 100644
--- a/vimrc
+++ b/vimrc
@@ -334,6 +334,9 @@
" * Remove `g:loaded_auditory` setting because Auditory sounds are off
" by default starting with v0.1.0.
"
+" 2015.08.18:
+" * Add a mapping system copy the current file's path
+"
" Pathogen
@@ -662,6 +665,9 @@ nnoremap <leader>p :read !pbpaste<cr>
nnoremap <leader>gb :GitBlamer<cr>
nnoremap <leader>gp :!git log -p -- %<cr>
+" Copy the current file path into the OS X pasteboard
+nnoremap <leader>cf :call system('pbcopy', expand('%'))<cr>
+
" Commands