VIM’s default js syntax highlighting is quite unsatisfactory. You can find a better one online. However, I don’t recommend using too many plugins. Just take a look. However, it is recommended that you highlight the highlights, various parentheses, and various symbols, because these are the real delimiters in the code.
.vimrc 加入以下3句:
syntax enable " enable syntax hightlight and completion
syntax on " syntax highlighing
filetype on " try to detect file types
js highlighting (including js embedded in html, including independent js files), only uses a plug-in. https://github.com/pangloss/vim-javas...
VIM’s default js syntax highlighting is quite unsatisfactory. You can find a better one online. However, I don’t recommend using too many plugins. Just take a look. However, it is recommended that you highlight the highlights, various parentheses, and various symbols, because these are the real delimiters in the code.