othree / yajs.vim

YAJS.vim: Yet Another JavaScript Syntax for Vim
http://www.vim.org/scripts/script.php?script_id=4974
Vim License
688 stars 41 forks source link

Highlighting of comments after import #59

Closed mikekreeki closed 9 years ago

mikekreeki commented 9 years ago

Looks like comment highlighting does not when used after import definition (on the same line) or between import definitions (on a separate line).

Example code:

import foo from 'bar' // this comment is not highlighted (matched as jsImportContainer)
import bar from 'xyz'
// this comment is also not highlighted 
import xyz from 'foo'

// this one is highlighted correctly

It sometimes looks funny since other parts of the comment might get accidentally highlighted, like in this real world example:

Here words import and default are part of the comment but are highlighted the same as keywords.

othree commented 9 years ago

Not sure what happened. It works fine here.

2015-09-10 11 15 09

mikekreeki commented 9 years ago

Thanks for your response. It turned out removing jelera/vim-javascript-syntax from my ~/.vimrc fixes the issue. So is yajs.vim a full replacement for jelera/vim-javascript-syntax?

othree commented 9 years ago

Yes, yajs is full JS syntax

mikekreeki commented 9 years ago

Very cool, thank you very much for your effort :wink: