]> Sergey Matveev's repositories - dotfiles.git/commitdiff
.c/.h switcher
authorSergey Matveev <stargrave@stargrave.org>
Tue, 12 Apr 2022 08:20:23 +0000 (11:20 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 12 Apr 2022 08:20:46 +0000 (11:20 +0300)
vim/.vim/ftplugin/c/alt.vim [new file with mode: 0644]
vim/.vim/plugin/exted.vim [deleted file]

diff --git a/vim/.vim/ftplugin/c/alt.vim b/vim/.vim/ftplugin/c/alt.vim
new file mode 100644 (file)
index 0000000..609f37d
--- /dev/null
@@ -0,0 +1 @@
+nnoremap <buffer> <C-^> :execute "edit %<." . {"c": "h", "h": "c", "cc": "hh", "hh": "cc"}[expand("%:e")]<CR>
diff --git a/vim/.vim/plugin/exted.vim b/vim/.vim/plugin/exted.vim
deleted file mode 100644 (file)
index e24524e..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-if exists("*<SID>exted") | finish | endif
-
-function! s:exted(ext)
-    execute "edit %<." . a:ext
-endfunction
-
-command! -nargs=1 Ee silent call s:exted(<f-args>)