]> Sergey Matveev's repositories - dotfiles.git/blobdiff - vim/.vim/ftplugin/c/alt.vim
AltSwitcher is still not so satisfactory
[dotfiles.git] / vim / .vim / ftplugin / c / alt.vim
diff --git a/vim/.vim/ftplugin/c/alt.vim b/vim/.vim/ftplugin/c/alt.vim
deleted file mode 100644 (file)
index 35ef67b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-if exists("*<SID>CAltSwitcher") | finish | endif
-
-let g:AltExts = {
-    \ "c": ["h"],
-    \ "h": ["c", "cc"],
-    \ "cc": ["hh", "h"],
-    \ "hh": ["cc"]
-\}
-
-function! <SID>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 <buffer> <C-^> :call <SID>CAltSwitcher()<CR>