From 7c6909c0bf6f54349a7cef0ef96fb5ebc522dfcd Mon Sep 17 00:00:00 2001 From: druckdev Date: Thu, 24 Dec 2020 02:31:10 +0100 Subject: [PATCH] vim: Move vimtex settings into tex ftplugin And load vimtex automatically. I discarded the autocommand as vimtex only loads a small ftdetect script for tex and the rest of the plugin is made up of ftplugins, indent files, etc. by itself. The overhead of the autocmd feels bigger than just loading the small component and letting vim doing the rest. (But this is in now way tested/benchmarked. That is just how I feel and it makes it a tad cleaner) --- .config/vim/{vimtex.vim => ftplugin/tex.vim} | 0 .config/vim/pack/plugins/start/vimtex | 1 + .config/vim/vimrc.d/20-plugins.vim | 3 --- 3 files changed, 1 insertion(+), 3 deletions(-) rename .config/vim/{vimtex.vim => ftplugin/tex.vim} (100%) create mode 120000 .config/vim/pack/plugins/start/vimtex diff --git a/.config/vim/vimtex.vim b/.config/vim/ftplugin/tex.vim similarity index 100% rename from .config/vim/vimtex.vim rename to .config/vim/ftplugin/tex.vim diff --git a/.config/vim/pack/plugins/start/vimtex b/.config/vim/pack/plugins/start/vimtex new file mode 120000 index 0000000..9d503ce --- /dev/null +++ b/.config/vim/pack/plugins/start/vimtex @@ -0,0 +1 @@ +../opt/vimtex/ \ No newline at end of file diff --git a/.config/vim/vimrc.d/20-plugins.vim b/.config/vim/vimrc.d/20-plugins.vim index b424a0f..a035147 100644 --- a/.config/vim/vimrc.d/20-plugins.vim +++ b/.config/vim/vimrc.d/20-plugins.vim @@ -12,6 +12,3 @@ if (has('patch-8.1.1719') || has('nvim')) packadd! coc.nvim source $XDG_CONFIG_HOME/vim/coc.nvim.vim endif -" LaTeX -autocmd BufNewFile,BufRead *.tex packadd! vimtex - \ | source $XDG_CONFIG_HOME/vim/vimtex.vim