aboutsummaryrefslogtreecommitdiffstats
path: root/vimrc
diff options
context:
space:
mode:
authorTeddy Wing2014-06-06 22:09:17 -0400
committerTeddy Wing2014-06-06 22:09:17 -0400
commit1f8e240d419d522b3f6e226aad3ec3b9a8c271db (patch)
tree33f0cb8d27fc905c0c2d903b3121100ff6d2fef8 /vimrc
parent320e54ce8d0109bce251acbbe457402aa1c2a059 (diff)
downloaddotvim-1f8e240d419d522b3f6e226aad3ec3b9a8c271db.tar.bz2
vimrc: add mapping to open current file in TextMate
Just in case. Can be useful to open the file in a different editor sometimes and if there's an easy way to do it all the better.
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc5
1 files changed, 5 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index b436055..ef6fa15 100644
--- a/vimrc
+++ b/vimrc
@@ -201,6 +201,8 @@
" 2014.06.06:
" * Add Visual mode mapping to copy selected text to the OS X clipboard
" since I'm using stock vim not compiled with clipboard support.
+" * Add mapping to open the current file in TextMate. Occasionally it's
+" useful to open the file in a different editor.
"
@@ -514,6 +516,9 @@ nnoremap <leader>sb :setlocal scrollbind!<cr>
" http://stackoverflow.com/a/17126375
vnoremap <leader>c !tee >(pbcopy)<cr>
+" Open current file in TextMate
+nnoremap <leader>om :execute '!mate ' . expand('%:p')<cr>
+
" Commands