History

initial import

phil9 committed 5 years ago

Commit dd360bcNo parent (first commit)1336 files · +557163 −-5Browse files

Showing the changes to lib/vimfiles/ftplugin/javascript.vim (1 of 1336 files). Show all

Unified · Split

lib/vimfiles/ftplugin/javascript.vim+38−0
@@ -0,0 +1,38 @@
1" Vim filetype plugin file
2" Language: Javascript
3" Maintainer: Doug Kearns <dougkearns@gmail.com>
4" Last Change: 2007 Feb 21
5" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/ftplugin/javascript.vim
6
7if exists("b:did_ftplugin")
8 finish
9endif
10let b:did_ftplugin = 1
11
12let s:cpo_save = &cpo
13set cpo-=C
14
15" Set 'formatoptions' to break comment lines but not other lines,
16" " and insert the comment leader when hitting <CR> or using "o".
17setlocal formatoptions-=t formatoptions+=croql
18
19" Set completion with CTRL-X CTRL-O to autoloaded function.
20if exists('&ofu')
21 setlocal omnifunc=javascriptcomplete#CompleteJS
22endif
23
24" Set 'comments' to format dashed lists in comments.
25setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
26
27setlocal commentstring=//%s
28
29" Change the :browse e filter to primarily show Java-related files.
30if has("gui_win32")
31 let b:browsefilter="Javascript Files (*.js)\t*.js\n"
32 \ "All Files (*.*)\t*.*\n"
33endif
34
35let b:undo_ftplugin = "setl fo< ofu< com< cms<"
36
37let &cpo = s:cpo_save
38unlet s:cpo_save