switch files : switch between .c and .h files or different path and same filename easily
script karma |
Rating -5/5,
Downloaded by 1046 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Marc Weber |
|
script type |
utility |
|
description |
Call
function! vl#lib#files#switch_files#SwitchFileUI()
map <m-s><m-b> :call vl#lib#files#switch_files#SwitchFile()<cr>
endfunction
somewhere to get the default mapping.
Then use lines like this
call vl#lib#files#switch_files#SwitchFileRegisterLocalRegexSwap('.h$', ['.cpp', '.cc' ])
autocmd BufRead,BufNewFile /pr/*nix,/pr/*nix/*.sh call vl#lib#files#switch_files#SwitchFileRegisterLocalRegexSwap('/pr/mynix/','/pr/svnnix/')
for each buffer to tell the script how to find alternates.
There is also some support to add custom functions. Drop me an email if you want to know more |
|
install details |
Just source the file and follow the instructions.
You'll be asked before any action is taken.
If you don't feel comfortable installing to .vim insntall to another arbitrary directory and add it to your runtimepath
(let runtimepath+= ..) |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 142.132.191.50
|