1 " Vim filetype plugin file
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
4 " Last Change: 2008 Jun 15
5 " URL: http://gus.gscit.monash.edu.au/~djkea2/vim/ftplugin/javascript.vim
7 if exists("b:did_ftplugin")
10 let b:did_ftplugin = 1
15 " Set 'formatoptions' to break comment lines but not other lines,
16 " " and insert the comment leader when hitting <CR> or using "o".
17 setlocal formatoptions-=t formatoptions+=croql
19 " Set completion with CTRL-X CTRL-O to autoloaded function.
21 setlocal omnifunc=javascriptcomplete#CompleteJS
24 " Set 'comments' to format dashed lists in comments.
25 setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
27 setlocal commentstring=//%s
29 " Change the :browse e filter to primarily show Java-related files.
31 let b:browsefilter="Javascript Files (*.js)\t*.js\n" .
32 \ "All Files (*.*)\t*.*\n"
35 let b:undo_ftplugin = "setl fo< ofu< com< cms<"