SHOW:
|
|
- or go back to the newest paste.
1 | function! SwitchToAlternate() | |
2 | let l:Filename = expand('%:t:r') | |
3 | let l:Extension = expand('%:t:e') | |
4 | if l:Extension == "hpp" | |
5 | let l:Alternate = l:Filename.".cpp" | |
6 | - | echom "switching to ".l:Alternate |
6 | + | |
7 | - | exec "e ".l:Alternate |
7 | + | |
8 | endif | |
9 | echom "switching to ".l:Alternate | |
10 | - | echom "switching to ".l:Alternate |
10 | + | exec "e ".l:Alternate |
11 | - | exec "e ".l:Alternate |
11 | + | |
12 | ||
13 | - | |
13 | + |