History
Article Edit this page Discussion

Syntax highlighting for HTML with embedded Javascript

From Vim Tips Wiki

Jump to: navigation, search

Tip 1193 Previous Next Created: March 31, 2006 Complexity: basic Author: Anon Version: 6.0


Just use the "htmlm4.vim" syntax script. (I got this from VimTip1041, but it was non-obvious to somebody looking for a quick answer.)

Put simply, while in normal mode, type the following:

:set filetype=htmlm4

You can automatically load this syntax for all html files by adding the following line to your vimrc

au BufRead *.html set filetype=htmlm4

[edit] Comments

Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto Wiki
Doctor Who
Legend of Zelda Wiki
Terminator Wiki
Everquest II Wiki
Mystery Science Theater 3000
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions
Send this article to a friend
"Syntax highlighting for HTML with embedded Javascript"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation