X-Git-Url: http://www.git.stargrave.org/?p=dotfiles.git;a=blobdiff_plain;f=vim%2F.vim%2Fftplugin%2Fc%2Falt.vim;fp=vim%2F.vim%2Fftplugin%2Fc%2Falt.vim;h=0000000000000000000000000000000000000000;hp=35ef67b9bd8f29ed3c040b12444b2cff5dfbff1c;hb=e21853080f5005ad6c6b548146d339abd197f28e;hpb=370a8149d970135915f34b03c1732eef6aaf95e5;ds=sidebyside diff --git a/vim/.vim/ftplugin/c/alt.vim b/vim/.vim/ftplugin/c/alt.vim deleted file mode 100644 index 35ef67b..0000000 --- a/vim/.vim/ftplugin/c/alt.vim +++ /dev/null @@ -1,21 +0,0 @@ -if exists("*CAltSwitcher") | finish | endif - -let g:AltExts = { - \ "c": ["h"], - \ "h": ["c", "cc"], - \ "cc": ["hh", "h"], - \ "hh": ["cc"] -\} - -function! CAltSwitcher() abort - for ext in g:AltExts[expand("%:e")] - let name = expand("%<") . "." . ext - if filereadable(name) - execute "edit " . name - return - endif - endfor - echomsg "no alt found" -endfunction - -nnoremap :call CAltSwitcher()