diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-04-19 14:49:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-19 14:49:33 +0800 |
commit | 3e6a9fb599f0a774a62cb1090d89202af68aba63 (patch) | |
tree | b2584f4f19f636fdb6eaae4a473f62ecf8b1c281 /runtime/doc | |
parent | 13ebfafc958c6feb4d908eed913c6dc3c6f05b4e (diff) | |
download | rneovim-3e6a9fb599f0a774a62cb1090d89202af68aba63.tar.gz rneovim-3e6a9fb599f0a774a62cb1090d89202af68aba63.tar.bz2 rneovim-3e6a9fb599f0a774a62cb1090d89202af68aba63.zip |
vim-patch:36e667ab837c (#28407)
runtime(java): Support "g:ftplugin_java_source_path" with archived files
Also, document for "g:ftplugin_java_source_path" its current
modification of the local value of the 'path' option.
closes: vim/vim#14570
https://github.com/vim/vim/commit/36e667ab837cd27b8c0c9df5c2db8008b2e1b76c
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/filetype.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 6041354c92..b1eb841e90 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -590,6 +590,37 @@ The mapping can be disabled with: > let g:no_gprof_maps = 1 +JAVA *ft-java-plugin* + +Whenever the variable "g:ftplugin_java_source_path" is defined and its value +is a filename whose extension is either ".jar" or ".zip", e.g.: > + let g:ftplugin_java_source_path = '/path/to/src.jar' + let g:ftplugin_java_source_path = '/path/to/src.zip' +< +and the |zip| plugin has already been sourced, the |gf| command can be used to +open the archive and the |n| command can be used to look for the selected type +and the <Return> key can be used to load a listed file. + +Note that the effect of using the "gf" command WITHIN a buffer loaded with the +Zip plugin depends on the version of the Zip plugin. For the Zip plugin +versions that do not support Jar type archives, consider creating symbolic +links with the ".zip" extension for each Jar archive of interest and assigning +any such file to the variable from now on. + +Otherwise, for the defined variable "g:ftplugin_java_source_path", the local +value of the 'path' option will be further modified by prefixing the value of +the variable, e.g.: > + let g:ftplugin_java_source_path = $JDK_SRC_PATH + let &l:path = g:ftplugin_java_source_path . ',' . &l:path +< +and the "gf" command can be used on a fully-qualified type to look for a file +in the "path" and to try to load it. + +Remember to manually trigger the |FileType| event from a buffer with a Java +file loaded in it each time after assigning a new value to the variable: > + doautocmd FileType +< + MAIL *ft-mail-plugin* Options: |