summaryrefslogtreecommitdiffstats
path: root/tv
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-07-03 20:49:02 +0200
committertv <tv@krebsco.de>2016-07-03 20:49:02 +0200
commitab9f109fd557ae1f9b8d28f92540a5aa8d4d0300 (patch)
tree37d74e31475dbd1a35353a2f1b556953bd622013 /tv
parent672fc99c796a4c2fe41efd79462a86142ecc2e76 (diff)
tv vim: unlet b:current_syntax if exists
Diffstat (limited to 'tv')
-rw-r--r--tv/2configs/vim.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix
index 0a8466202..86c5d05d6 100644
--- a/tv/2configs/vim.nix
+++ b/tv/2configs/vim.nix
@@ -180,7 +180,9 @@ let
sigil = ''\(${concatStringsSep ''\|'' startAlts}\)[ \t\r\n]*'';
in /* vim */ ''
syn include @nix_${lang}_syntax syntax/${lang}.vim
- unlet b:current_syntax
+ if exists("b:current_syntax")
+ unlet b:current_syntax
+ endif
syn match nix_${lang}_sigil
\ X${replaceStrings ["X"] ["\\X"] sigil}\ze\('''\|"\)X