Skip to content

Commit

Permalink
Properly highlight nested comments in vim
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
bstrie authored and brson committed Jun 30, 2012
1 parent e2c7016 commit ba6f71f
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/etc/vim/syntax/rust.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@
" Maintainer: Patrick Walton <pcwalton@mozilla.com>
" 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 rustAssert assert
Expand Down

0 comments on commit ba6f71f

Please sign in to comment.