From 92ab75408df8bff49bb29e113b3cc159d1ac3105 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sat, 18 Jul 2015 23:05:45 +0200 Subject: Allow for disabling individual languages, closes #66 --- after/syntax/c.vim | 4 ++++ after/syntax/coffee.vim | 4 ++++ after/syntax/cpp.vim | 4 ++++ after/syntax/css.vim | 4 ++++ after/syntax/haml.vim | 4 ++++ after/syntax/help.vim | 4 ++++ after/syntax/html.vim | 12 ++++++++++++ after/syntax/json.vim | 4 ++++ after/syntax/jsx.vim | 4 ++++ after/syntax/less.vim | 4 ++++ after/syntax/lua.vim | 4 ++++ after/syntax/moon.vim | 4 ++++ after/syntax/rspec.vim | 4 ++++ after/syntax/ruby.vim | 4 ++++ after/syntax/rust.vim | 4 ++++ after/syntax/sass.vim | 4 ++++ after/syntax/scss.vim | 4 ++++ after/syntax/stylus.vim | 4 ++++ after/syntax/tex.vim | 4 ++++ after/syntax/vim.vim | 4 ++++ after/syntax/yaml.vim | 4 ++++ 21 files changed, 92 insertions(+) (limited to 'after/syntax') diff --git a/after/syntax/c.vim b/after/syntax/c.vim index 0805d666..aa4a31ec 100644 --- a/after/syntax/c.vim +++ b/after/syntax/c.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c++11') == -1 + " Vim syntax file " Language: C Additions " Maintainer: Jon Haggblad @@ -290,3 +292,5 @@ hi def link cBoolean Boolean "hi def link cDelimiter Delimiter " foldmethod=syntax fix, courtesy of Ivan Freitas "hi def link cBraces Delimiter + +endif diff --git a/after/syntax/coffee.vim b/after/syntax/coffee.vim index 64e0dc4f..b77c12bb 100644 --- a/after/syntax/coffee.vim +++ b/after/syntax/coffee.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cjsx') == -1 + if exists('b:current_syntax') let s:current_syntax=b:current_syntax unlet b:current_syntax @@ -25,3 +27,5 @@ hi def link cjsxTagName Function hi def link cjsxEntity Statement hi def link cjsxEntityPunct Type hi def link cjsxAttribProperty Type + +endif diff --git a/after/syntax/cpp.vim b/after/syntax/cpp.vim index 5a0c2183..6eb3cfad 100644 --- a/after/syntax/cpp.vim +++ b/after/syntax/cpp.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c++11') == -1 + " Vim syntax file " Language: C++ Additions " Maintainer: Jon Haggblad @@ -1364,3 +1366,5 @@ if version >= 508 || !exists("did_cpp_syntax_inits") HiLink cppRawDelimiter Delimiter delcommand HiLink endif + +endif diff --git a/after/syntax/css.vim b/after/syntax/css.vim index ffb3e43d..afe9da60 100644 --- a/after/syntax/css.vim +++ b/after/syntax/css.vim @@ -1,6 +1,10 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'css-color') == -1 + " Language: Colorful CSS Color Preview " Author: Aristotle Pagaltzis if !( has('gui_running') || &t_Co==256 ) | finish | endif call css_color#init('css', 'extended', 'cssMediaBlock,cssFunction,cssDefinition,cssAttrRegion,cssComment') + +endif diff --git a/after/syntax/haml.vim b/after/syntax/haml.vim index 4c517ebb..5333de69 100644 --- a/after/syntax/haml.vim +++ b/after/syntax/haml.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 + " Language: CoffeeScript " Maintainer: Sven Felix Oberquelle " URL: http://github.com/kchmck/vim-coffee-script @@ -11,3 +13,5 @@ syn region hamlCoffeescriptFilter matchgroup=hamlFilter \ end="^\%(\z1 \| *$\)\@!" \ contains=@hamlCoffeeScript,hamlInterpolation \ keepend + +endif diff --git a/after/syntax/help.vim b/after/syntax/help.vim index e3232128..58b79943 100644 --- a/after/syntax/help.vim +++ b/after/syntax/help.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 + " Extends standard help syntax with highlighting of Scala code. " " Place code between !sc! and !/sc! delimiters. These will be hidden if Vim is @@ -12,3 +14,5 @@ if has('conceal') else syntax region rgnScala matchgroup=Ignore start='!sc!' end='!/sc!' contains=@ScalaCode endif + +endif diff --git a/after/syntax/html.vim b/after/syntax/html.vim index b9dc9f98..7ea622c6 100644 --- a/after/syntax/html.vim +++ b/after/syntax/html.vim @@ -1,3 +1,5 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 + " Language: CoffeeScript " Maintainer: Mick Koch " URL: http://github.com/kchmck/vim-coffee-script @@ -9,6 +11,10 @@ syn region coffeeScript start=##me=s-1 keepend \ contains=@htmlCoffeeScript,htmlScriptTag,@htmlPreproc \ containedin=htmlHead + +endif +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'less') == -1 + if !exists("g:less_html_style_tags") let g:less_html_style_tags = 1 endif @@ -35,6 +41,10 @@ syn region lessStyle start=+