From 24183fcb2df64a5094f52e8ea170f0bee0f9e407 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Tue, 12 Apr 2022 11:20:23 +0300 Subject: [PATCH] .c/.h switcher --- vim/.vim/ftplugin/c/alt.vim | 1 + vim/.vim/plugin/exted.vim | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) create mode 100644 vim/.vim/ftplugin/c/alt.vim delete mode 100644 vim/.vim/plugin/exted.vim diff --git a/vim/.vim/ftplugin/c/alt.vim b/vim/.vim/ftplugin/c/alt.vim new file mode 100644 index 0000000..609f37d --- /dev/null +++ b/vim/.vim/ftplugin/c/alt.vim @@ -0,0 +1 @@ +nnoremap :execute "edit %<." . {"c": "h", "h": "c", "cc": "hh", "hh": "cc"}[expand("%:e")] diff --git a/vim/.vim/plugin/exted.vim b/vim/.vim/plugin/exted.vim deleted file mode 100644 index e24524e..0000000 --- a/vim/.vim/plugin/exted.vim +++ /dev/null @@ -1,7 +0,0 @@ -if exists("*exted") | finish | endif - -function! s:exted(ext) - execute "edit %<." . a:ext -endfunction - -command! -nargs=1 Ee silent call s:exted() -- 2.44.0