Permalink
Browse files

Create file-openers plugin.

  • Loading branch information...
1 parent 335dc99 commit 33c99135b53cc8dcb031d2f69ab3894f8fab251e @nelstrom committed Jan 21, 2012
Showing with 9 additions and 7 deletions.
  1. +9 −0 vim/plugin/file-openers.vim
  2. +0 −7 vimrc
@@ -0,0 +1,9 @@
+" Shortcuts for opening file in same directory as current file {{{2
+cnoremap %% <C-R>=expand('%:h').'/'<cr>
+map <leader>ew :e %%
+map <leader>es :sp %%
+map <leader>ev :vsp %%
+map <leader>et :tabe %%
+
+" Prompt to open file with same name, different extension
+map <leader>er :e <C-R>=expand("%:r")."."<CR>
View
7 vimrc
@@ -110,13 +110,6 @@ nmap <Leader>/ :TlistToggle<CR>
" Mappings {{{1
-" Shortcuts for opening file in same directory as current file {{{2
-cnoremap %% <C-R>=expand('%:h').'/'<cr>
-map <leader>ew :e %%
-map <leader>es :sp %%
-map <leader>ev :vsp %%
-map <leader>et :tabe %%
-map <leader>er :e <C-R>=expand("%:r")."."<CR>
" Shortcuts for visual selections {{{2
nmap gV `[v`]
" http://stackoverflow.com/questions/6228079/remove-newlines-from-a-register-in-vim/6235707#6235707

0 comments on commit 33c9913

Please sign in to comment.