From: Giftpflanze Date: Sat, 17 Feb 2024 11:24:04 +0000 (+0100) Subject: misc/vim/ftplugin: Improvements X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=13a1a16d9001067d006fa7a39e8ebf91aafeb26a misc/vim/ftplugin: Improvements * Remove ColorColumn highlight, highlights are global * Fix comments * Add commentstring for comment plugins * Add pattern for the standard matchit plugin: lets you jump between both tokens with % --- diff --git a/misc/vim/ftplugin/factor.vim b/misc/vim/ftplugin/factor.vim index a738b5a00f..b30b766bfa 100644 --- a/misc/vim/ftplugin/factor.vim +++ b/misc/vim/ftplugin/factor.vim @@ -18,15 +18,18 @@ setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 " Try to limit lines to 64 characters. setlocal textwidth=64 colorcolumn=+1 -hi ColorColumn ctermbg=darkgrey guibg=#1e2528 " Teach Vim what comments look like. -setlocal comments+=b:!,b:#! +setlocal comments=b:!,f:#! +setlocal commentstring=!\ %s " Make all of these characters part of a word (useful for " skipping over words with w, e, and b) setlocal iskeyword=33-126,128-255 +" matchit patterns +let b:match_words = '\<:\\>' + " Insert closing brackets and quotes, spaces, stack effects ... " examples ("|" is the position of the cursor): " |if + [ → [|] if