Mercurial > vim
comparison runtime/ftplugin/javascript.vim @ 1125:96cd8222a819
updated for version 7.1a
author | vimboss |
---|---|
date | Sat, 05 May 2007 18:24:42 +0000 |
parents | bc95c6c4bac1 |
children | 53938adac247 |
comparison
equal
deleted
inserted
replaced
1124:da2a955f150a | 1125:96cd8222a819 |
---|---|
1 " Vim filetype plugin file | 1 " Vim filetype plugin file |
2 " Language: Javascript | 2 " Language: Javascript |
3 " Maintainer: Bram Moolenaar (for now) | 3 " Maintainer: Doug Kearns <dougkearns@gmail.com> |
4 " Last Change: 2006 Jan 30 | 4 " Last Change: 2007 Feb 21 |
5 " URL: http://gus.gscit.monash.edu.au/~djkea2/vim/ftplugin/javascript.vim | |
5 | 6 |
6 if exists("b:did_ftplugin") | 7 if exists("b:did_ftplugin") |
7 finish | 8 finish |
8 endif | 9 endif |
9 let b:did_ftplugin = 1 | 10 let b:did_ftplugin = 1 |
10 | 11 |
12 let s:cpo_save = &cpo | |
13 set 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". | |
17 setlocal formatoptions-=t formatoptions+=croql | |
18 | |
19 " Set completion with CTRL-X CTRL-O to autoloaded function. | |
11 if exists('&ofu') | 20 if exists('&ofu') |
12 setlocal ofu=javascriptcomplete#CompleteJS | 21 setlocal omnifunc=javascriptcomplete#CompleteJS |
13 endif | 22 endif |
23 | |
24 " Set 'comments' to format dashed lists in comments. | |
25 setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// | |
26 | |
27 setlocal commentstring=//%s | |
28 | |
29 " Change the :browse e filter to primarily show Java-related files. | |
30 if has("gui_win32") | |
31 let b:browsefilter="Javascript Files (*.js)\t*.js\n" | |
32 \ "All Files (*.*)\t*.*\n" | |
33 endif | |
34 | |
35 let b:undo_ftplugin = "setl fo< ofu< com< cms<" | |
36 | |
37 let &cpo = s:cpo_save | |
38 unlet s:cpo_save |