annotate runtime/ftplugin/java.vim @ 7350:5ac8ee7bf4ff v7.4.980

commit https://github.com/vim/vim/commit/57d7971b5f1621071176eea81cdb0d1fc50c925d Author: Bram Moolenaar <Bram@vim.org> Date: Mon Dec 28 14:04:47 2015 +0100 patch 7.4.980 Problem: Tests for :cdo, :ldo, etc. are outdated. Solution: Add new style tests for these commands. (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Mon, 28 Dec 2015 14:15:04 +0100
parents 94601b379f38
children c968191a8557
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim filetype plugin file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Java
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 232
diff changeset
3 " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
3410
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
4 " Last Change: 2012 Mar 11
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 232
diff changeset
5 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 if exists("b:did_ftplugin") | finish | endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 let b:did_ftplugin = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " Make sure the continuation lines below do not cause problems in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " compatibility mode.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 let s:save_cpo = &cpo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 set cpo-=C
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " For filename completion, prefer the .java extension over the .class
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " extension.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 set suffixes+=.class
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " Enable gf on import statements. Convert . in the package
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " name to / and append .java to the name, then search the path.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 setlocal includeexpr=substitute(v:fname,'\\.','/','g')
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 setlocal suffixesadd=.java
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 if exists("g:ftplugin_java_source_path")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 let &l:path=g:ftplugin_java_source_path . ',' . &l:path
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " Set 'formatoptions' to break comment lines but not other lines,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 " and insert the comment leader when hitting <CR> or using "o".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 setlocal formatoptions-=t formatoptions+=croql
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 " Set 'comments' to format dashed lists in comments. Behaves just like C.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 setlocal comments& comments^=sO:*\ -,mO:*\ \ ,exO:*/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 setlocal commentstring=//%s
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " Change the :browse e filter to primarily show Java-related files.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 if has("gui_win32")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 let b:browsefilter="Java Files (*.java)\t*.java\n" .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 \ "Properties Files (*.prop*)\t*.prop*\n" .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 \ "Manifest Files (*.mf)\t*.mf\n" .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 \ "All Files (*.*)\t*.*\n"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " Undo the stuff we changed.
232
41e7594cac8b updated for version 7.0065
vimboss
parents: 7
diff changeset
45 let b:undo_ftplugin = "setlocal suffixes< suffixesadd<" .
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 \ " formatoptions< comments< commentstring< path< includeexpr<" .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 \ " | unlet! b:browsefilter"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 " Restore the saved compatibility options.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 let &cpo = s:save_cpo
3410
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
51 unlet s:save_cpo