On Monday, July 22, 2013 1:57:34 PM UTC-7, Amadeus Demarzi wrote: > On Monday, July 22, 2013 1:50:39 PM UTC-7, Bram Moolenaar wrote: > > Amadeus Demarzi wrote: > > > > > > > > > This patch fixes javascript.vim and css.vim from clobbering plugin > > > syntaxes when sourced via html.vim. > > > > > > > > > > Would it be possible to get this in for 7.4? > > > > > > > > > > More details here: > > > > > https://groups.google.com/forum/#!topic/vim_dev/4Idz6Em2ZuU > > > > > > > > > > It's a long explanation, so this would be the TL;DR for it > > > > > > > > Makes sense. It can be reduced to one elseif: > > > > > > > > elseif exists("b:current_syntax") && b:current_syntax == 'css' > > > > finish > > > > endif > > > > > > > > > > > > -- > > > > "How is your new girlfriend?" > > > > "90-60-90 man!" > > > > "What, pale purple?" > > > > > > > > /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ > > > > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ > > > > \\\ an exciting new programming language -- http://www.Zimbu.org /// > > > > \\\ help me help AIDS victims -- http://ICCF-Holland.org /// > > This is true, I can amend the patch and resubmit if you'd like? > > Thanks for the response!
Just in case, I've attached an updated patch with the single line if statements. Also, I noticed on my older patch a mixed the use of single and double quotes, that should be rectified to only double quotes here as well. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
# HG changeset patch # User amadeus <[email protected]> # Date 1374560593 25200 # Mon Jul 22 23:23:13 2013 -0700 # Node ID bf48ba5d9e36e58f75f80d77e8b0d77f78ad1fe9 # Parent 3f65dc9c8840c376ae38e5b5d48688cb5d7a4846 Improve built in javascript.vim and css.vim in html files This commit prevents the built in javascript.vim and css.vim runtime files from clobbering a plugin that may have already setup syntax rules. diff -r 3f65dc9c8840 -r bf48ba5d9e36 runtime/syntax/css.vim --- a/runtime/syntax/css.vim Sun Jul 21 18:59:24 2013 +0200 +++ b/runtime/syntax/css.vim Mon Jul 22 23:23:13 2013 -0700 @@ -17,6 +17,8 @@ finish endif let main_syntax = 'css' +elseif exists("b:current_syntax") && b:current_syntax == "css" + finish endif let s:cpo_save = &cpo diff -r 3f65dc9c8840 -r bf48ba5d9e36 runtime/syntax/javascript.vim --- a/runtime/syntax/javascript.vim Sun Jul 21 18:59:24 2013 +0200 +++ b/runtime/syntax/javascript.vim Mon Jul 22 23:23:13 2013 -0700 @@ -22,6 +22,8 @@ finish endif let main_syntax = 'javascript' +elseif exists("b:current_syntax") && b:current_syntax == "javascript" + finish endif let s:cpo_save = &cpo @@ -58,9 +60,9 @@ syn keyword javaScriptException try catch finally throw syn keyword javaScriptMessage alert confirm prompt status syn keyword javaScriptGlobal self window top parent -syn keyword javaScriptMember document event location +syn keyword javaScriptMember document event location syn keyword javaScriptDeprecated escape unescape -syn keyword javaScriptReserved abstract boolean byte char class const debugger double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile +syn keyword javaScriptReserved abstract boolean byte char class const debugger double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile if exists("javaScript_fold") syn match javaScriptFunction "\<function\>" @@ -123,7 +125,7 @@ HiLink javaScriptMessage Keyword HiLink javaScriptGlobal Keyword HiLink javaScriptMember Keyword - HiLink javaScriptDeprecated Exception + HiLink javaScriptDeprecated Exception HiLink javaScriptReserved Keyword HiLink javaScriptDebug Debug HiLink javaScriptConstant Label
