aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/filetype.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/filetype.txt')
-rw-r--r--runtime/doc/filetype.txt107
1 files changed, 92 insertions, 15 deletions
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index 071a45c9c3..5eae78744c 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -155,6 +155,8 @@ variables can be used to overrule the filetype used for certain extensions:
`*.inc` g:filetype_inc
`*.lsl` g:filetype_lsl
`*.m` g:filetype_m |ft-mathematica-syntax|
+ `*.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md`
+ g:filetype_md |ft-pandoc-syntax|
`*.mod` g:filetype_mod
`*.p` g:filetype_p |ft-pascal-syntax|
`*.pl` g:filetype_pl
@@ -400,6 +402,31 @@ So to enable this only for ruby, set the following variable: >
If both, the global `plugin_exec` and the `<filetype>_exec` specific variable
are set, the filetype specific variable should have precedent.
+
+ASCIIDOC *ft-asciidoc-plugin*
+
+To enable |folding| use this: >
+ let g:asciidoc_folding = 1
+
+To disable nesting of folded headers use this: >
+ let g:asciidoc_foldnested = 0
+
+To disable folding everything under the title use this: >
+ let asciidoc_fold_under_title = 0
+
+
+ARDUINO *ft-arduino-plugin*
+
+By default the following options are set, in accordance with the default
+settings of Arduino IDE: >
+
+ setlocal expandtab tabstop=2 softtabstop=2 shiftwidth=2
+
+To disable this behavior, set the following variable in your vimrc: >
+
+ let g:arduino_recommended_style = 0
+
+
AWK *ft-awk-plugin*
Support for features specific to GNU Awk, like @include, can be enabled by
@@ -527,18 +554,6 @@ under it. If not found, a new entry and item is prepended to the beginning of
the Changelog.
-ASCIIDOC *ft-asciidoc-plugin*
-
-To enable |folding| use this: >
- let g:asciidoc_folding = 1
-
-To disable nesting of folded headers use this: >
- let g:asciidoc_foldnested = 0
-
-To disable folding everything under the title use this: >
- let asciidoc_fold_under_title = 0
-
-
FORTRAN *ft-fortran-plugin*
Options:
@@ -587,6 +602,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:
@@ -626,8 +672,10 @@ Man Open the manpage for the <cWORD> (man buffers)
or <cword> (non-man buffers) under the cursor.
Man! Display the current buffer contents as a manpage.
-|:Man| accepts command modifiers. For example, to use a vertical split: >
+|:Man| accepts command modifiers. For example, to use a vertical split: >vim
:vertical Man printf
+To reuse the current window: >vim
+ :hide Man printf
Local mappings:
K or CTRL-] Jump to the manpage for the <cWORD> under the
@@ -647,14 +695,14 @@ Variables:
empty. Enabled by default. Set |FALSE| to enable soft
wrapping.
-To use Nvim as a manpager: >
+To use Nvim as a manpager: >sh
export MANPAGER='nvim +Man!'
Note that when running `man` from the shell and with that `MANPAGER` in your
environment, `man` will pre-format the manpage using `groff`. Thus, Nvim
will inevitably display the manual page as it was passed to it from stdin. One
of the caveats of this is that the width will _always_ be hard-wrapped and not
-soft wrapped as with `g:man_hardwrap=0`. You can set in your environment: >
+soft wrapped as with `g:man_hardwrap=0`. You can set in your environment: >sh
export MANWIDTH=999
So `groff`'s pre-formatting output will be the same as with `g:man_hardwrap=0` i.e soft-wrapped.
@@ -662,6 +710,10 @@ So `groff`'s pre-formatting output will be the same as with `g:man_hardwrap=0` i
To disable bold highlighting: >
:highlight link manBold Normal
+An alternative to using `MANPAGER` in shell can be redefined `man`, for example: >sh
+ man() {
+ nvim "+hide Man $1"
+ }
MARKDOWN *ft-markdown-plugin*
@@ -942,6 +994,31 @@ The mappings can be disabled with: >
let g:no_vim_maps = 1
+ZIG *ft-zig-plugin*
+
+ *g:zig_recommended_style*
+By default the following indentation options are set, in accordance with Zig's
+recommended style (https://ziglang.org/documentation/master/): >
+
+ setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
+<
+To disable this behavior, set |g:zig_recommended_style| to 0: >
+
+ let g:zig_recommended_style = 0
+<
+ *g:zig_std_dir*
+The path to the Zig standard library. The Zig |ftplugin| reads |g:zig_std_dir|
+and appends it to the 'path' for Zig files. Where the Zig standard library
+is located is system and installation method dependent.
+
+One can automatically set |g:zig_std_dir| using `zig env`: >
+
+ let g:zig_std_dir = json_decode(system('zig env'))['std_dir']
+<
+This can, for example, be put in a FileType |:autocmd| or user |ftplugin| to
+only load when a Zig file is opened.
+
+
ZIMBU *ft-zimbu-plugin*
The Zimbu filetype plugin defines mappings to move to the start and end of