Mercurial > vim
annotate runtime/ftplugin/java.vim @ 8793:dda254280bab v7.4.1685
commit https://github.com/vim/vim/commit/7fed5c18f8577b75404b80d8b9a9907b1bbd27e4
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Mar 29 23:10:31 2016 +0200
patch 7.4.1685
Problem: There is no easy way to get all the information about a match.
Solution: Add matchstrpos(). (Ozaki Kiichi)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 29 Mar 2016 23:15:06 +0200 |
parents | 94601b379f38 |
children | c968191a8557 |
rev | line source |
---|---|
7 | 1 " Vim filetype plugin file |
2 " Language: Java | |
2034 | 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 | 5 " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin |
7 | 6 |
7 if exists("b:did_ftplugin") | finish | endif | |
8 let b:did_ftplugin = 1 | |
9 | |
10 " Make sure the continuation lines below do not cause problems in | |
11 " compatibility mode. | |
12 let s:save_cpo = &cpo | |
13 set cpo-=C | |
14 | |
15 " For filename completion, prefer the .java extension over the .class | |
16 " extension. | |
17 set suffixes+=.class | |
18 | |
19 " Enable gf on import statements. Convert . in the package | |
20 " name to / and append .java to the name, then search the path. | |
21 setlocal includeexpr=substitute(v:fname,'\\.','/','g') | |
22 setlocal suffixesadd=.java | |
23 if exists("g:ftplugin_java_source_path") | |
24 let &l:path=g:ftplugin_java_source_path . ',' . &l:path | |
25 endif | |
26 | |
27 " Set 'formatoptions' to break comment lines but not other lines, | |
28 " and insert the comment leader when hitting <CR> or using "o". | |
29 setlocal formatoptions-=t formatoptions+=croql | |
30 | |
31 " Set 'comments' to format dashed lists in comments. Behaves just like C. | |
32 setlocal comments& comments^=sO:*\ -,mO:*\ \ ,exO:*/ | |
33 | |
34 setlocal commentstring=//%s | |
35 | |
36 " Change the :browse e filter to primarily show Java-related files. | |
37 if has("gui_win32") | |
38 let b:browsefilter="Java Files (*.java)\t*.java\n" . | |
39 \ "Properties Files (*.prop*)\t*.prop*\n" . | |
40 \ "Manifest Files (*.mf)\t*.mf\n" . | |
41 \ "All Files (*.*)\t*.*\n" | |
42 endif | |
43 | |
44 " Undo the stuff we changed. | |
232 | 45 let b:undo_ftplugin = "setlocal suffixes< suffixesadd<" . |
7 | 46 \ " formatoptions< comments< commentstring< path< includeexpr<" . |
47 \ " | unlet! b:browsefilter" | |
48 | |
49 " Restore the saved compatibility options. | |
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 |