From 3e0d15bb3fbd22ddfb3e72ecb58b4fc943c2d391 Mon Sep 17 00:00:00 2001 From: Ben Striegel Date: Thu, 28 Jun 2012 22:02:25 -0400 Subject: [PATCH] Properly highlight nested comments in vim Prior to this commit, every block comment /* */ required two closing tags for every opening tag in order to terminate the highlighting. Setting and testing for a variable was the culprit, though I'm not certain why, but they appear to just be boilerplate lines from whatever pcwalton based this file upon. I've looked at other officially-distributed vim highlighting files and none seem to do the test that this commit removes, so I'm fairly certain it didn't provide anything vital. And now comment highlighting works! --- src/etc/vim/syntax/rust.vim | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/etc/vim/syntax/rust.vim b/src/etc/vim/syntax/rust.vim index 7c339ed0856cd..0270d633449c3 100644 --- a/src/etc/vim/syntax/rust.vim +++ b/src/etc/vim/syntax/rust.vim @@ -3,15 +3,10 @@ " Maintainer: Patrick Walton " Last Change: 2010 Oct 13 -" Quit when a syntax file was already loaded -if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") - finish - endif - " we define it here so that included files can test for it - let main_syntax='rust' +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish endif syn keyword rustKeyword alt as assert break