diff --git a/.config/vim/ftplugin/gitcommit.vim b/.config/vim/ftplugin/gitcommit.vim new file mode 100644 index 0000000..7fa569f --- /dev/null +++ b/.config/vim/ftplugin/gitcommit.vim @@ -0,0 +1,4 @@ +" Shorter lines. Subject should be max 50 and body max 72 +setlocal colorcolumn=50,72 +" Spell checking always enabled +setlocal spell spelllang=en_us diff --git a/.config/vim/ftplugin/zsh.vim b/.config/vim/ftplugin/zsh.vim new file mode 100644 index 0000000..d1acc99 --- /dev/null +++ b/.config/vim/ftplugin/zsh.vim @@ -0,0 +1,2 @@ +" zshOption is a huge regex that leads to massive lags when scrolling +syntax clear zshOption diff --git a/.config/vim/vimrc b/.config/vim/vimrc index a4509b0..c5d39cb 100644 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -108,15 +108,6 @@ if (has('nvim')) endif " Autocommands ################################################################# -" Shorter lines in git commits -autocmd filetype gitcommit set colorcolumn=50,72 -" Spell checking in git commits -autocmd filetype gitcommit set spell spelllang=en_us - -" zshOption is a huge regex that leads to massive lags when scrolling -" Be sure to disable it after activating syntax highlighting -autocmd filetype zsh syntax clear zshOption - " Highlight trailing whitespaces " (https://vim.fandom.com/wiki/Highlight_unwanted_spaces) " Create highlight group