Created
December 18, 2009 03:25
-
-
Save fcamel/259264 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"open A_test.X if current file name is A.X | |
"open A.X if current file name is A_test.X | |
function OpenCorrespondingFile() | |
let d = split(expand("%"), '_test') | |
if len(d) == 1 | |
let name = expand("%:r") . "_test." . expand("%:e") | |
else | |
let name = d[0] . d[1] | |
endif | |
exec 'vsplit ' name | |
endfunction | |
map ,, :call OpenCorrespondingFile()<C-M> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment