From cbdd559a759b5aef9b1c97d8b69a29e159d14ae1 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Tue, 29 Sep 2020 10:04:43 -0700 Subject: [PATCH] misc/vim: some minor fixes. - fix word definition to have dashes and other printables - fix private to properly highlight and close the region --- misc/vim/ftplugin/factor.vim | 4 ++++ misc/vim/syntax/factor.vim | 8 +------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/misc/vim/ftplugin/factor.vim b/misc/vim/ftplugin/factor.vim index 002330b4b0..ca8df689c5 100644 --- a/misc/vim/ftplugin/factor.vim +++ b/misc/vim/ftplugin/factor.vim @@ -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 diff --git a/misc/vim/syntax/factor.vim b/misc/vim/syntax/factor.vim index 2f12f97c41..1546794227 100644 --- a/misc/vim/syntax/factor.vim +++ b/misc/vim/syntax/factor.vim @@ -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/ 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/ skip=/\v.*/ end=/\v<\S+%(\_\s+%(!>.*)?)+\d+>/ contains=@factorComment nextgroup=factorStackEffectSkip skipempty keepend contained -syn region factorPrivate matchgroup=factorPrivate start=/\v<\/ end=/\v>/ contains=@factorDefnContents,factorPDefn,factorPMethod,factorPLocalsMethod,factorPGeneric,factorPGenericN transparent +syn region factorPrivate matchgroup=factorPrivate start=/\v<\/ end=/\v>/ 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 -- 2.34.1