]> gitweb.factorcode.org Git - factor.git/commitdiff
misc/vim/ftplugin: Improvements
authorGiftpflanze <gifti@tools.wmflabs.org>
Sat, 17 Feb 2024 11:24:04 +0000 (12:24 +0100)
committerGiftpflanze <gifti@tools.wmflabs.org>
Sat, 17 Feb 2024 11:29:00 +0000 (12:29 +0100)
* Remove ColorColumn highlight, highlights are global
* Fix comments
* Add commentstring for comment plugins
* Add <PRIVATE PRIVATE> pattern for the standard matchit plugin:
  lets you jump between both tokens with %

misc/vim/ftplugin/factor.vim

index a738b5a00f2b7c53c8835a9ec5348e3e25dd8b11..b30b766bfabd7bff28ec79a243e145553c39b91a 100644 (file)
@@ -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 = '\<<PRIVATE\>:\<PRIVATE>\>'
+
 " Insert closing brackets and quotes, spaces, stack effects ...
 " examples ("|" is the position of the cursor):
 " |if + [ → [|] if