diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-29 03:25:37 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-29 03:25:37 +1200 |
commit | 0b2dcb96cadfd3a37c74297b40fc783a83d0a3f3 (patch) | |
tree | 750619d4bfca2cf6acfe5b76f8b0cda6f539f2bf | |
parent | Merge branch 'release/v5.0.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-0b2dcb96cadfd3a37c74297b40fc783a83d0a3f3.tar.gz dotfiles-0b2dcb96cadfd3a37c74297b40fc783a83d0a3f3.zip |
Merge branch 'release/v5.1.0'v5.1.0
* release/v5.1.0:
Bump VERSION
Limit :CompilerSet coloring to compiler/*.vim
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | vim/after/syntax/vim.vim | 36 |
2 files changed, 22 insertions, 18 deletions
@@ -1,2 +1,2 @@ -tejr dotfiles v5.0.0 -Tue May 28 15:19:09 UTC 2019 +tejr dotfiles v5.1.0 +Tue May 28 15:25:37 UTC 2019 diff --git a/vim/after/syntax/vim.vim b/vim/after/syntax/vim.vim index c5417413..cae5c815 100644 --- a/vim/after/syntax/vim.vim +++ b/vim/after/syntax/vim.vim @@ -1,19 +1,23 @@ " Remove special highlighting for double-quoted strings in comments syntax clear vimCommentString -" Highlight :CompilerSet commands like :set/:setlocal -syntax keyword vimCommand contained - \ CompilerSet -syntax region vimSet matchgroup=vimCommand - \ start="\<CompilerSet\>" - \ end="$" end="|" end="<[cC][rR]>" - \ keepend - \ matchgroup=vimNotation - \ oneline - \ skip="\%(\\\\\)*\\." - \ contains=vimSetEqual - \,vimOption - \,vimErrSetting - \,vimComment - \,vimSetString - \,vimSetMod +" Highlight :CompilerSet commands like :set/:setlocal, but only in compiler +" scripts in recognisable paths +if expand('%:h:t') ==# 'compiler' + \ && expand('%:e') ==# 'vim' + syntax keyword vimCommand contained + \ CompilerSet + syntax region vimSet matchgroup=vimCommand + \ start="\<CompilerSet\>" + \ end="$" end="|" end="<[cC][rR]>" + \ keepend + \ matchgroup=vimNotation + \ oneline + \ skip="\%(\\\\\)*\\." + \ contains=vimSetEqual + \,vimOption + \,vimErrSetting + \,vimComment + \,vimSetString + \,vimSetMod +endif |