sponsor Vim development Vim logo Vim Book Ad

jQuery : Syntax file for jQuery

 script karma  Rating 299/156, Downloaded by 20023  Comments, bugs, improvements  Vim wiki

created by
Bruno Michel
script type
jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript. See http://jquery.com/ for more details.

The syntax file for Vim add some colorations for jQuery keywords (empty clone hasClass hide show animate ...) and for CSS selectors (:empty :hidden :selected :first ...).
install details
Copy the jquery.vim file to $HOME/.vim/syntax/ and add the following line to your vimrc:
au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
jquery.vim 0.5.2 2011-05-29 7.0 Bruno Michel Fix an invalid regular expression
jquery.vim 0.5.1 2011-05-13 7.0 Bruno Michel Fix an error with contains (it's a reserved keyword for Vim).
jquery.vim 0.5 2011-05-04 7.0 Bruno Michel Upgrade to match jquery 1.6 keywords
jquery.vim 0.4 2010-02-02 6.0 Bruno Michel Avoid the dotted filetype syntax. Thanks Jeremy Cantrell for the patch.
jquery.vim 0.3 2010-01-15 7.0 Bruno Michel Recognize new keywords for jQuery 1.4
jquery.vim 0.3 2009-10-04 6.0 Bruno Michel Some fixes to jquery.vim by Taylon
jquery.vim 0.2 2009-09-20 7.0 Bruno Michel Upgrade jquery.vim to match jquery 1.3
jquery.vim 0.1 2008-10-25 6.0 Bruno Michel Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
Vim at Github