From 535123759ff48e22e4e3063160c8c407e5886094 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 18 Aug 2015 18:01:57 -0400 Subject: 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. --- vimrc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vimrc') 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 p :read !pbpaste nnoremap gb :GitBlamer nnoremap gp :!git log -p -- % +" Copy the current file path into the OS X pasteboard +nnoremap cf :call system('pbcopy', expand('%')) + " Commands -- cgit v1.2.3