Permalink
Browse files

Added shortcuts to :e file in same dir as current file.

,ew     -   open in current window
,es     -   open in new horizontal split
,ev     -   open in new vertical split
,et     -   open in a new tab
  • Loading branch information...
1 parent 51f7097 commit c3d95312df7fa805ee45693b24ae8c3a244a0ca8 @nelstrom committed Apr 3, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 vimrc
View
6 vimrc
@@ -147,7 +147,11 @@ map <D-7> 7gt
map <D-8> 8gt
map <D-9> 9gt
map <D-0> :tablast<CR>
-
+" Shortcuts for opening file in same directory as current file {{{2
+map <leader>ew :e <C-R>=expand("%:p:h") . "/" <CR>
+map <leader>es :sp <C-R>=expand("%:p:h") . "/" <CR>
+map <leader>ev :vsp <C-R>=expand("%:p:h") . "/" <CR>
+map <leader>et :tabe <C-R>=expand("%:p:h") . "/" <CR>
" Easily modify vimrc {{{1
nmap <leader>v :e $MYVIMRC<CR>

0 comments on commit c3d9531

Please sign in to comment.