summaryrefslogtreecommitdiffstats
path: root/syntax/gitconfig.vim
diff options
context:
space:
mode:
Diffstat (limited to 'syntax/gitconfig.vim')
-rw-r--r--syntax/gitconfig.vim6
1 files changed, 2 insertions, 4 deletions
diff --git a/syntax/gitconfig.vim b/syntax/gitconfig.vim
index 49b992b0..fbdedc51 100644
--- a/syntax/gitconfig.vim
+++ b/syntax/gitconfig.vim
@@ -10,18 +10,16 @@ if exists("b:current_syntax")
finish
endif
-setlocal iskeyword+=-
-setlocal iskeyword-=_
syn case ignore
syn sync minlines=10
syn match gitconfigComment "[#;].*"
syn match gitconfigSection "\%(^\s*\)\@<=\[[a-z0-9.-]\+\]"
syn match gitconfigSection '\%(^\s*\)\@<=\[[a-z0-9.-]\+ \+\"\%([^\\"]\|\\.\)*"\]'
-syn match gitconfigVariable "\%(^\s*\)\@<=\a\k*\%(\s*\%([=#;]\|$\)\)\@=" nextgroup=gitconfigAssignment skipwhite
+syn match gitconfigVariable "\%(^\s*\)\@<=\a[a-z0-9-]*\%(\s*\%([=#;]\|$\)\)\@=" nextgroup=gitconfigAssignment skipwhite
syn region gitconfigAssignment matchgroup=gitconfigNone start=+=\s*+ skip=+\\+ end=+\s*$+ contained contains=gitconfigBoolean,gitconfigNumber,gitConfigString,gitConfigEscape,gitConfigError,gitconfigComment keepend
syn keyword gitconfigBoolean true false yes no contained
-syn match gitconfigNumber "\d\+" contained
+syn match gitconfigNumber "\<\d\+\>" contained
syn region gitconfigString matchgroup=gitconfigDelim start=+"+ skip=+\\+ end=+"+ matchgroup=gitconfigError end=+[^\\"]\%#\@!$+ contained contains=gitconfigEscape,gitconfigEscapeError
syn match gitconfigError +\\.+ contained
syn match gitconfigEscape +\\[\\"ntb]+ contained