Mercurial > vim
annotate runtime/ftplugin/java.vim @ 31654:dc77b797c102
Added tag v9.0.1159 for changeset ec76f9d2319e18c1c8f587f7669059b07a846447
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 08 Jan 2023 21:00:06 +0100 |
parents | c968191a8557 |
children | 8ae680be2a51 |
rev | line source |
---|---|
7 | 1 " Vim filetype plugin file |
2 " Language: Java | |
28010 | 3 " |
4 " This runtime file is looking for a new maintainer. | |
5 " | |
6 " Former maintainer: Dan Sharp | |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
7 " Last Change: 2012 Mar 11 |
7 | 8 |
9 if exists("b:did_ftplugin") | finish | endif | |
10 let b:did_ftplugin = 1 | |
11 | |
12 " Make sure the continuation lines below do not cause problems in | |
13 " compatibility mode. | |
14 let s:save_cpo = &cpo | |
15 set cpo-=C | |
16 | |
17 " For filename completion, prefer the .java extension over the .class | |
18 " extension. | |
19 set suffixes+=.class | |
20 | |
21 " Enable gf on import statements. Convert . in the package | |
22 " name to / and append .java to the name, then search the path. | |
23 setlocal includeexpr=substitute(v:fname,'\\.','/','g') | |
24 setlocal suffixesadd=.java | |
25 if exists("g:ftplugin_java_source_path") | |
26 let &l:path=g:ftplugin_java_source_path . ',' . &l:path | |
27 endif | |
28 | |
29 " Set 'formatoptions' to break comment lines but not other lines, | |
30 " and insert the comment leader when hitting <CR> or using "o". | |
31 setlocal formatoptions-=t formatoptions+=croql | |
32 | |
33 " Set 'comments' to format dashed lists in comments. Behaves just like C. | |
34 setlocal comments& comments^=sO:*\ -,mO:*\ \ ,exO:*/ | |
35 | |
36 setlocal commentstring=//%s | |
37 | |
38 " Change the :browse e filter to primarily show Java-related files. | |
39 if has("gui_win32") | |
40 let b:browsefilter="Java Files (*.java)\t*.java\n" . | |
41 \ "Properties Files (*.prop*)\t*.prop*\n" . | |
42 \ "Manifest Files (*.mf)\t*.mf\n" . | |
43 \ "All Files (*.*)\t*.*\n" | |
44 endif | |
45 | |
46 " Undo the stuff we changed. | |
232 | 47 let b:undo_ftplugin = "setlocal suffixes< suffixesadd<" . |
7 | 48 \ " formatoptions< comments< commentstring< path< includeexpr<" . |
49 \ " | unlet! b:browsefilter" | |
50 | |
51 " Restore the saved compatibility options. | |
52 let &cpo = s:save_cpo | |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
53 unlet s:save_cpo |