vim: Move language specific bits into ftplugin/
Move stuff for specific languages executed by autocommands into own filetype plugins to keep the vimrc cleaner.
This commit is contained in:
4
.config/vim/ftplugin/gitcommit.vim
Normal file
4
.config/vim/ftplugin/gitcommit.vim
Normal file
@@ -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
|
||||||
2
.config/vim/ftplugin/zsh.vim
Normal file
2
.config/vim/ftplugin/zsh.vim
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
" zshOption is a huge regex that leads to massive lags when scrolling
|
||||||
|
syntax clear zshOption
|
||||||
@@ -108,15 +108,6 @@ if (has('nvim'))
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Autocommands #################################################################
|
" 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
|
" Highlight trailing whitespaces
|
||||||
" (https://vim.fandom.com/wiki/Highlight_unwanted_spaces)
|
" (https://vim.fandom.com/wiki/Highlight_unwanted_spaces)
|
||||||
" Create highlight group
|
" Create highlight group
|
||||||
|
|||||||
Reference in New Issue
Block a user