]> gitweb.factorcode.org Git - factor.git/commitdiff
misc/vim: some minor fixes.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 29 Sep 2020 17:04:43 +0000 (10:04 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 29 Sep 2020 17:04:43 +0000 (10:04 -0700)
- fix word definition to have dashes and other printables
- fix private to properly highlight and close the region

misc/vim/ftplugin/factor.vim
misc/vim/syntax/factor.vim

index 002330b4b08fe69f784c7bcfd28f9e1e2f4f76d1..ca8df689c53ab2fd1fc5e39b6005b1531417504e 100644 (file)
@@ -25,3 +25,7 @@ augroup END
 
 " Teach Vim what comments look like.
 setlocal comments+=b:!,b:#!
+
+" 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
index 2f12f97c41136c225f5137eab722c83a5f3f0c95..15467942278ca6d43f6826ef2e6d91e834bd5ca5 100644 (file)
@@ -57,12 +57,6 @@ endif
 " Factor is case sensitive.
 syn case match
 
-" Make all of these characters part of a word (useful for skipping over words with w, e, and b)
-let s:iskeyword = '!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255'
-let s:set_iskeyword = has('patch-7.4.1142') ? 'syn iskeyword ' :
-      \ 'setlocal iskeyword='
-execute s:set_iskeyword . s:iskeyword
-
 syn match   factorWord   /\v<\S+>/  contains=@factorWord transparent display
 syn cluster factorClusterNoComment  contains=factorWord,@factorMultilineComment,@factorClusterValue,factorBoolean,factorBreakpoint,factorDeclaration,factorCallQuotation,factorExecute,factorCallNextMethod,@factorWordOps,factorAlien,factorSlot,factorTuple,factorErrorSyn,factorStruct
 syn cluster factorCluster           contains=@factorComment,@factorClusterNoComment
@@ -139,7 +133,7 @@ syn region  factorPLocalsMethodDelims   start=/\v<M::>/        skip=/\v<!>.*/
 syn region  factorPGeneric        start=/\v<%(GENERIC|MATH|PRIMITIVE):>/                        end=/\v<\S+>/   contains=@factorComment nextgroup=factorStackEffectSkip skipempty contained
 syn region  factorPGenericN matchgroup=factorPGenericN    start=/\v<GENERIC\#:>/   skip=/\v<!>.*/   end=/\v<\S+%(\_\s+%(!>.*)?)+\d+>/ contains=@factorComment nextgroup=factorStackEffectSkip skipempty keepend contained
 
-syn region  factorPrivate matchgroup=factorPrivate start=/\v<\<PRIVATE>/ end=/\v<PRIVATE\>>/ contains=@factorDefnContents,factorPDefn,factorPMethod,factorPLocalsMethod,factorPGeneric,factorPGenericN transparent
+syn region  factorPrivate matchgroup=factorPrivate start=/\v<\<PRIVATE>/ end=/\v<PRIVATE\>>/ contains=@factorDefnContents,factorPDefn,factorPMethod,factorPLocalsMethod,factorPGeneric,factorPGenericN skipempty keepend
 
 syn cluster factorClusterValue      contains=factorBreakpoint,factorBoolean,factorFrySpecifier,factorChar,@factorString,@factorNumber,factorBackslash,factorMBackslash,factorLiteral,factorLiteralBlock,@factorStackEffect,@factorQuotation,@factorArray