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 | let l:Alternate = l:Extension == '.hpp' ? l:Filename.".cpp" : l:Filename.".hpp" | |
5 | - | endif |
5 | + | |
6 | exec "e ".l:Alternate | |
7 | endfunction | |
8 | ||
9 | nnoremap <localleader>a :call SwitchToAlternate()<cr> |