2017-03-21 09:08:19 -07:00
|
|
|
*filetype.txt* Nvim
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
|
|
|
|
|
|
|
|
|
|
|
Filetypes *filetype* *file-type*
|
|
|
|
|
|
|
|
Also see |autocmd.txt|.
|
|
|
|
|
2017-10-20 17:33:58 -07:00
|
|
|
Type |gO| to see the table of contents.
|
2017-05-01 08:09:29 -07:00
|
|
|
|
2014-07-10 21:05:51 -07:00
|
|
|
==============================================================================
|
|
|
|
1. Filetypes *filetypes* *file-types*
|
|
|
|
|
|
|
|
Vim can detect the type of file that is edited. This is done by checking the
|
|
|
|
file name and sometimes by inspecting the contents of the file for specific
|
|
|
|
text.
|
|
|
|
|
|
|
|
*:filetype* *:filet*
|
|
|
|
To enable file type detection, use this command in your vimrc: >
|
|
|
|
:filetype on
|
|
|
|
Each time a new or existing file is edited, Vim will try to recognize the type
|
|
|
|
of the file and set the 'filetype' option. This will trigger the FileType
|
|
|
|
event, which can be used to set the syntax highlighting, set options, etc.
|
|
|
|
|
2022-01-04 07:28:29 -07:00
|
|
|
Detail: The ":filetype on" command will load these files:
|
|
|
|
$VIMRUNTIME/filetype.lua
|
2018-01-03 11:57:22 -07:00
|
|
|
$VIMRUNTIME/filetype.vim
|
2022-01-04 07:28:29 -07:00
|
|
|
filetype.lua creates an autocommand that fires for all BufNewFile and
|
|
|
|
BufRead events. It tries to detect the filetype based off of the
|
|
|
|
file's extension or name.
|
|
|
|
|
|
|
|
filetype.vim is a Vim script that defines autocommands for the
|
|
|
|
BufNewFile and BufRead events. In contrast to filetype.lua, this
|
|
|
|
file creates separate BufNewFile and BufRead events for each filetype
|
|
|
|
pattern.
|
|
|
|
|
|
|
|
If the file type is not found by the name, the file
|
|
|
|
$VIMRUNTIME/scripts.vim is used to detect it from the contents of the
|
|
|
|
file.
|
2017-11-07 12:43:11 -07:00
|
|
|
When the GUI is running or will start soon, the |menu.vim| script is
|
2024-10-22 09:14:01 -07:00
|
|
|
also sourced.
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
To add your own file types, see |new-filetype| below. To search for help on a
|
|
|
|
filetype prepend "ft-" and optionally append "-syntax", "-indent" or
|
|
|
|
"-plugin". For example: >
|
|
|
|
:help ft-vim-indent
|
|
|
|
:help ft-vim-syntax
|
|
|
|
:help ft-man-plugin
|
|
|
|
|
|
|
|
If the file type is not detected automatically, or it finds the wrong type,
|
|
|
|
you can either set the 'filetype' option manually, or add a modeline to your
|
|
|
|
file. Example, for an IDL file use the command: >
|
|
|
|
:set filetype=idl
|
|
|
|
|
2023-06-21 06:40:40 -07:00
|
|
|
or add this |modeline| to the file: >
|
|
|
|
/* vim: set filetype=idl : */
|
|
|
|
<
|
2014-07-10 21:05:51 -07:00
|
|
|
*:filetype-plugin-on*
|
|
|
|
You can enable loading the plugin files for specific file types with: >
|
|
|
|
:filetype plugin on
|
|
|
|
If filetype detection was not switched on yet, it will be as well.
|
|
|
|
This actually loads the file "ftplugin.vim" in 'runtimepath'.
|
|
|
|
The result is that when a file is edited its plugin file is loaded (if there
|
|
|
|
is one for the detected filetype). |filetype-plugin|
|
|
|
|
|
|
|
|
*:filetype-plugin-off*
|
|
|
|
You can disable it again with: >
|
|
|
|
:filetype plugin off
|
|
|
|
The filetype detection is not switched off then. But if you do switch off
|
|
|
|
filetype detection, the plugins will not be loaded either.
|
|
|
|
This actually loads the file "ftplugof.vim" in 'runtimepath'.
|
|
|
|
|
|
|
|
*:filetype-indent-on*
|
|
|
|
You can enable loading the indent file for specific file types with: >
|
|
|
|
:filetype indent on
|
|
|
|
If filetype detection was not switched on yet, it will be as well.
|
|
|
|
This actually loads the file "indent.vim" in 'runtimepath'.
|
|
|
|
The result is that when a file is edited its indent file is loaded (if there
|
|
|
|
is one for the detected filetype). |indent-expression|
|
|
|
|
|
|
|
|
*:filetype-indent-off*
|
|
|
|
You can disable it again with: >
|
|
|
|
:filetype indent off
|
|
|
|
The filetype detection is not switched off then. But if you do switch off
|
|
|
|
filetype detection, the indent files will not be loaded either.
|
|
|
|
This actually loads the file "indoff.vim" in 'runtimepath'.
|
|
|
|
This disables auto-indenting for files you will open. It will keep working in
|
|
|
|
already opened files. Reset 'autoindent', 'cindent', 'smartindent' and/or
|
|
|
|
'indentexpr' to disable indenting in an opened file.
|
|
|
|
|
|
|
|
*:filetype-off*
|
|
|
|
To disable file type detection, use this command: >
|
|
|
|
:filetype off
|
|
|
|
This will keep the flags for "plugin" and "indent", but since no file types
|
|
|
|
are being detected, they won't work until the next ":filetype on".
|
|
|
|
|
|
|
|
|
|
|
|
Overview: *:filetype-overview*
|
|
|
|
|
|
|
|
command detection plugin indent ~
|
|
|
|
:filetype on on unchanged unchanged
|
|
|
|
:filetype off off unchanged unchanged
|
|
|
|
:filetype plugin on on on unchanged
|
|
|
|
:filetype plugin off unchanged off unchanged
|
|
|
|
:filetype indent on on unchanged on
|
|
|
|
:filetype indent off unchanged unchanged off
|
|
|
|
:filetype plugin indent on on on on
|
|
|
|
:filetype plugin indent off unchanged off off
|
|
|
|
|
|
|
|
To see the current status, type: >
|
|
|
|
:filetype
|
|
|
|
The output looks something like this: >
|
|
|
|
filetype detection:ON plugin:ON indent:OFF
|
|
|
|
|
|
|
|
The file types are also used for syntax highlighting. If the ":syntax on"
|
|
|
|
command is used, the file type detection is installed too. There is no need
|
|
|
|
to do ":filetype on" after ":syntax on".
|
|
|
|
|
|
|
|
To disable one of the file types, add a line in your filetype file, see
|
|
|
|
|remove-filetype|.
|
|
|
|
|
|
|
|
*filetype-detect*
|
|
|
|
To detect the file type again: >
|
|
|
|
:filetype detect
|
|
|
|
Use this if you started with an empty file and typed text that makes it
|
|
|
|
possible to detect the file type. For example, when you entered this in a
|
|
|
|
shell script: "#!/bin/csh".
|
|
|
|
When filetype detection was off, it will be enabled first, like the "on"
|
|
|
|
argument was used.
|
|
|
|
|
|
|
|
*filetype-overrule*
|
2022-01-23 10:38:41 -07:00
|
|
|
When the same extension is used for multiple filetypes, Vim tries to guess
|
|
|
|
what kind of file it is. This doesn't always work. A number of global
|
|
|
|
variables can be used to overrule the filetype used for certain extensions:
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
file name variable ~
|
2023-09-11 16:48:40 -07:00
|
|
|
`*.asa` g:filetype_asa |ft-aspperl-syntax|
|
|
|
|
|ft-aspvbs-syntax|
|
|
|
|
`*.asm` g:asmsyntax |ft-asm-syntax|
|
|
|
|
`*.asp` g:filetype_asp |ft-aspperl-syntax|
|
|
|
|
|ft-aspvbs-syntax|
|
|
|
|
`*.bas` g:filetype_bas |ft-basic-syntax|
|
2023-06-21 06:40:40 -07:00
|
|
|
`*.cfg` g:filetype_cfg
|
|
|
|
`*.cls` g:filetype_cls
|
2023-09-11 16:48:40 -07:00
|
|
|
`*.csh` g:filetype_csh |ft-csh-syntax|
|
2023-06-21 06:40:40 -07:00
|
|
|
`*.dat` g:filetype_dat
|
2024-01-16 10:45:57 -07:00
|
|
|
`*.def` g:filetype_def
|
2024-06-20 02:45:41 -07:00
|
|
|
`*.dsp` g:filetype_dsp
|
2023-09-11 16:48:40 -07:00
|
|
|
`*.f` g:filetype_f |ft-forth-syntax|
|
|
|
|
`*.frm` g:filetype_frm |ft-form-syntax|
|
|
|
|
`*.fs` g:filetype_fs |ft-forth-syntax|
|
|
|
|
`*.h` g:c_syntax_for_h |ft-c-syntax|
|
|
|
|
`*.i` g:filetype_i |ft-progress-syntax|
|
2023-06-21 06:40:40 -07:00
|
|
|
`*.inc` g:filetype_inc
|
|
|
|
`*.lsl` g:filetype_lsl
|
2023-09-11 16:48:40 -07:00
|
|
|
`*.m` g:filetype_m |ft-mathematica-syntax|
|
2024-04-08 13:42:54 -07:00
|
|
|
`*.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md`
|
|
|
|
g:filetype_md |ft-pandoc-syntax|
|
2023-06-21 06:40:40 -07:00
|
|
|
`*.mod` g:filetype_mod
|
2023-09-11 16:48:40 -07:00
|
|
|
`*.p` g:filetype_p |ft-pascal-syntax|
|
2023-06-21 06:40:40 -07:00
|
|
|
`*.pl` g:filetype_pl
|
2023-09-11 16:48:40 -07:00
|
|
|
`*.pp` g:filetype_pp |ft-pascal-syntax|
|
2023-06-21 06:40:40 -07:00
|
|
|
`*.prg` g:filetype_prg
|
|
|
|
`*.r` g:filetype_r
|
|
|
|
`*.sig` g:filetype_sig
|
2023-09-11 16:48:40 -07:00
|
|
|
`*.sql` g:filetype_sql |ft-sql-syntax|
|
2023-06-21 06:40:40 -07:00
|
|
|
`*.src` g:filetype_src
|
|
|
|
`*.sys` g:filetype_sys
|
2023-09-11 16:48:40 -07:00
|
|
|
`*.sh` g:bash_is_sh |ft-sh-syntax|
|
|
|
|
`*.tex` g:tex_flavor |ft-tex-plugin|
|
2023-06-21 06:40:40 -07:00
|
|
|
`*.typ` g:filetype_typ
|
2024-01-02 04:06:43 -07:00
|
|
|
`*.v` g:filetype_v
|
2023-09-11 16:48:40 -07:00
|
|
|
`*.w` g:filetype_w |ft-cweb-syntax|
|
2014-07-10 21:05:51 -07:00
|
|
|
|
2022-04-08 10:53:41 -07:00
|
|
|
For a few filetypes the global variable is used only when the filetype could
|
|
|
|
not be detected:
|
2023-06-21 06:40:40 -07:00
|
|
|
`*.r` g:filetype_r |ft-rexx-syntax|
|
2022-04-08 10:53:41 -07:00
|
|
|
|
2014-07-10 21:05:51 -07:00
|
|
|
*filetype-ignore*
|
|
|
|
To avoid that certain files are being inspected, the g:ft_ignore_pat variable
|
|
|
|
is used. The default value is set like this: >
|
|
|
|
:let g:ft_ignore_pat = '\.\(Z\|gz\|bz2\|zip\|tgz\)$'
|
|
|
|
This means that the contents of compressed files are not inspected.
|
|
|
|
|
|
|
|
*new-filetype*
|
2022-01-04 07:28:29 -07:00
|
|
|
If a file type that you want to use is not detected yet, there are a few ways
|
2022-10-16 23:52:40 -07:00
|
|
|
to add it. The recommended way is to use |vim.filetype.add()| to add it to
|
|
|
|
Nvim's builtin filetype detection mechanism. If you want to handle the
|
|
|
|
detection manually, proceed as follows:
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
A. If you want to overrule all default file type checks.
|
|
|
|
This works by writing one file for each filetype. The disadvantage is that
|
2022-10-16 23:52:40 -07:00
|
|
|
there can be many files. The advantage is that you can simply drop this
|
2018-08-04 18:17:08 -07:00
|
|
|
file in the right directory to make it work.
|
2014-07-10 21:05:51 -07:00
|
|
|
*ftdetect*
|
|
|
|
1. Create your user runtime directory. You would normally use the first
|
|
|
|
item of the 'runtimepath' option. Then create the directory "ftdetect"
|
|
|
|
inside it. Example for Unix: >
|
2015-10-17 07:25:53 -07:00
|
|
|
:!mkdir -p ~/.config/nvim/ftdetect
|
2014-07-10 21:05:51 -07:00
|
|
|
<
|
|
|
|
2. Create a file that contains an autocommand to detect the file type.
|
|
|
|
Example: >
|
|
|
|
au BufRead,BufNewFile *.mine set filetype=mine
|
|
|
|
< Note that there is no "augroup" command, this has already been done
|
|
|
|
when sourcing your file. You could also use the pattern "*" and then
|
|
|
|
check the contents of the file to recognize it.
|
|
|
|
Write this file as "mine.vim" in the "ftdetect" directory in your user
|
|
|
|
runtime directory. For example, for Unix: >
|
2015-10-17 07:25:53 -07:00
|
|
|
:w ~/.config/nvim/ftdetect/mine.vim
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
< 3. To use the new filetype detection you must restart Vim.
|
|
|
|
|
|
|
|
The files in the "ftdetect" directory are used after all the default
|
|
|
|
checks, thus they can overrule a previously detected file type. But you
|
|
|
|
can also use |:setfiletype| to keep a previously detected filetype.
|
|
|
|
|
|
|
|
B. If you want to detect your file after the default file type checks.
|
|
|
|
|
|
|
|
This works like A above, but instead of setting 'filetype' unconditionally
|
|
|
|
use ":setfiletype". This will only set 'filetype' if no file type was
|
|
|
|
detected yet. Example: >
|
|
|
|
au BufRead,BufNewFile *.txt setfiletype text
|
|
|
|
<
|
|
|
|
You can also use the already detected file type in your command. For
|
|
|
|
example, to use the file type "mypascal" when "pascal" has been detected: >
|
|
|
|
au BufRead,BufNewFile * if &ft == 'pascal' | set ft=mypascal
|
|
|
|
| endif
|
|
|
|
|
2022-01-04 07:28:29 -07:00
|
|
|
C. If your file type can be detected by the file name or extension.
|
2014-07-10 21:05:51 -07:00
|
|
|
1. Create your user runtime directory. You would normally use the first
|
|
|
|
item of the 'runtimepath' option. Example for Unix: >
|
2015-10-17 07:25:53 -07:00
|
|
|
:!mkdir -p ~/.config/nvim
|
2014-07-10 21:05:51 -07:00
|
|
|
<
|
|
|
|
2. Create a file that contains autocommands to detect the file type.
|
|
|
|
Example: >
|
|
|
|
" my filetype file
|
|
|
|
if exists("did_load_filetypes")
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
augroup filetypedetect
|
|
|
|
au! BufRead,BufNewFile *.mine setfiletype mine
|
|
|
|
au! BufRead,BufNewFile *.xyz setfiletype drawing
|
|
|
|
augroup END
|
2022-01-04 07:28:29 -07:00
|
|
|
<
|
|
|
|
Write this file as "filetype.vim" in your user runtime directory. For
|
2014-07-10 21:05:51 -07:00
|
|
|
example, for Unix: >
|
2015-10-17 07:25:53 -07:00
|
|
|
:w ~/.config/nvim/filetype.vim
|
2022-04-20 12:41:35 -07:00
|
|
|
|
2022-07-07 09:53:47 -07:00
|
|
|
< 3. To use the new filetype detection you must restart Vim.
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
Your filetype.vim will be sourced before the default FileType autocommands
|
|
|
|
have been installed. Your autocommands will match first, and the
|
|
|
|
":setfiletype" command will make sure that no other autocommands will set
|
|
|
|
'filetype' after this.
|
|
|
|
*new-filetype-scripts*
|
|
|
|
D. If your filetype can only be detected by inspecting the contents of the
|
|
|
|
file.
|
|
|
|
|
|
|
|
1. Create your user runtime directory. You would normally use the first
|
|
|
|
item of the 'runtimepath' option. Example for Unix: >
|
2015-10-17 07:25:53 -07:00
|
|
|
:!mkdir -p ~/.config/nvim
|
2014-07-10 21:05:51 -07:00
|
|
|
<
|
|
|
|
2. Create a vim script file for doing this. Example: >
|
|
|
|
if did_filetype() " filetype already set..
|
|
|
|
finish " ..don't do these checks
|
|
|
|
endif
|
|
|
|
if getline(1) =~ '^#!.*\<mine\>'
|
|
|
|
setfiletype mine
|
|
|
|
elseif getline(1) =~? '\<drawing\>'
|
|
|
|
setfiletype drawing
|
|
|
|
endif
|
|
|
|
< See $VIMRUNTIME/scripts.vim for more examples.
|
|
|
|
Write this file as "scripts.vim" in your user runtime directory. For
|
|
|
|
example, for Unix: >
|
2015-10-17 07:25:53 -07:00
|
|
|
:w ~/.config/nvim/scripts.vim
|
2014-07-10 21:05:51 -07:00
|
|
|
<
|
|
|
|
3. The detection will work right away, no need to restart Vim.
|
|
|
|
|
|
|
|
Your scripts.vim is loaded before the default checks for file types, which
|
|
|
|
means that your rules override the default rules in
|
|
|
|
$VIMRUNTIME/scripts.vim.
|
|
|
|
|
2022-10-16 23:52:40 -07:00
|
|
|
*remove-filetype*
|
|
|
|
If a file type is detected that is wrong for you, you can set 'filetype' to
|
|
|
|
a non-existing name such as `ignored` to avoid that it will be set later anyway.
|
|
|
|
|
|
|
|
*g:did_load_filetypes*
|
2022-07-07 09:53:47 -07:00
|
|
|
The builtin filetype detection provided by Nvim can be disabled by setting
|
2022-10-16 23:52:40 -07:00
|
|
|
the `did_load_filetypes` global variable. If this variable exists, the default
|
|
|
|
`$VIMRUNTIME/filetype.lua` will not run.
|
2022-07-07 09:53:47 -07:00
|
|
|
|
2014-07-10 21:05:51 -07:00
|
|
|
*plugin-details*
|
|
|
|
The "plugin" directory can be in any of the directories in the 'runtimepath'
|
|
|
|
option. All of these directories will be searched for plugins and they are
|
|
|
|
all loaded. For example, if this command: >
|
|
|
|
|
|
|
|
set runtimepath
|
|
|
|
|
|
|
|
produces this output:
|
|
|
|
|
2021-04-25 08:56:17 -07:00
|
|
|
runtimepath=/etc/vim,~/.config/nvim,/usr/local/share/vim/vim82 ~
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
then Vim will load all plugins in these directories and below:
|
|
|
|
|
|
|
|
/etc/vim/plugin/ ~
|
2015-10-17 07:25:53 -07:00
|
|
|
~/.config/nvim/plugin/ ~
|
2021-04-25 08:56:17 -07:00
|
|
|
/usr/local/share/vim/vim82/plugin/ ~
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
Note that the last one is the value of $VIMRUNTIME which has been expanded.
|
|
|
|
|
2018-10-29 00:27:28 -07:00
|
|
|
Note that when using a plugin manager or |packages| many directories will be
|
2018-10-29 01:37:48 -07:00
|
|
|
added to 'runtimepath'. These plugins each require their own directory, don't
|
2020-04-16 11:49:05 -07:00
|
|
|
put them directly in ~/.config/nvim/plugin.
|
2018-10-29 00:27:28 -07:00
|
|
|
|
2014-07-10 21:05:51 -07:00
|
|
|
What if it looks like your plugin is not being loaded? You can find out what
|
|
|
|
happens when Vim starts up by using the |-V| argument: >
|
|
|
|
|
|
|
|
vim -V2
|
|
|
|
|
|
|
|
You will see a lot of messages, in between them is a remark about loading the
|
|
|
|
plugins. It starts with:
|
|
|
|
|
|
|
|
Searching for "plugin/**/*.vim" in ~
|
|
|
|
|
|
|
|
There you can see where Vim looks for your plugin scripts.
|
|
|
|
|
|
|
|
==============================================================================
|
|
|
|
2. Filetype plugin *filetype-plugins*
|
|
|
|
|
|
|
|
When loading filetype plugins has been enabled |:filetype-plugin-on|, options
|
|
|
|
will be set and mappings defined. These are all local to the buffer, they
|
|
|
|
will not be used for other files.
|
|
|
|
|
|
|
|
Defining mappings for a filetype may get in the way of the mappings you
|
|
|
|
define yourself. There are a few ways to avoid this:
|
|
|
|
1. Set the "maplocalleader" variable to the key sequence you want the mappings
|
|
|
|
to start with. Example: >
|
|
|
|
:let maplocalleader = ","
|
|
|
|
< All mappings will then start with a comma instead of the default, which
|
|
|
|
is a backslash. Also see |<LocalLeader>|.
|
|
|
|
|
|
|
|
2. Define your own mapping. Example: >
|
|
|
|
:map ,p <Plug>MailQuote
|
|
|
|
< You need to check the description of the plugin file below for the
|
|
|
|
functionality it offers and the string to map to.
|
|
|
|
You need to define your own mapping before the plugin is loaded (before
|
|
|
|
editing a file of that type). The plugin will then skip installing the
|
|
|
|
default mapping.
|
2022-01-01 02:56:55 -07:00
|
|
|
*no_mail_maps* *g:no_mail_maps*
|
2014-07-10 21:05:51 -07:00
|
|
|
3. Disable defining mappings for a specific filetype by setting a variable,
|
|
|
|
which contains the name of the filetype. For the "mail" filetype this
|
|
|
|
would be: >
|
|
|
|
:let no_mail_maps = 1
|
2022-01-01 02:56:55 -07:00
|
|
|
< *no_plugin_maps* *g:no_plugin_maps*
|
2014-07-10 21:05:51 -07:00
|
|
|
4. Disable defining mappings for all filetypes by setting a variable: >
|
|
|
|
:let no_plugin_maps = 1
|
|
|
|
<
|
|
|
|
|
|
|
|
*ftplugin-overrule*
|
|
|
|
If a global filetype plugin does not do exactly what you want, there are three
|
|
|
|
ways to change this:
|
|
|
|
|
|
|
|
1. Add a few settings.
|
|
|
|
You must create a new filetype plugin in a directory early in
|
|
|
|
'runtimepath'. For Unix, for example you could use this file: >
|
2015-10-17 07:25:53 -07:00
|
|
|
vim ~/.config/nvim/ftplugin/fortran.vim
|
2023-08-09 10:20:18 -07:00
|
|
|
< You can set those settings and mappings that you would like to add. Note
|
2014-07-10 21:05:51 -07:00
|
|
|
that the global plugin will be loaded after this, it may overrule the
|
|
|
|
settings that you do here. If this is the case, you need to use one of the
|
|
|
|
following two methods.
|
|
|
|
|
|
|
|
2. Make a copy of the plugin and change it.
|
|
|
|
You must put the copy in a directory early in 'runtimepath'. For Unix, for
|
|
|
|
example, you could do this: >
|
2015-10-17 07:25:53 -07:00
|
|
|
cp $VIMRUNTIME/ftplugin/fortran.vim ~/.config/nvim/ftplugin/fortran.vim
|
2023-08-09 10:20:18 -07:00
|
|
|
< Then you can edit the copied file to your liking. Since the b:did_ftplugin
|
2014-07-10 21:05:51 -07:00
|
|
|
variable will be set, the global plugin will not be loaded.
|
|
|
|
A disadvantage of this method is that when the distributed plugin gets
|
|
|
|
improved, you will have to copy and modify it again.
|
|
|
|
|
|
|
|
3. Overrule the settings after loading the global plugin.
|
|
|
|
You must create a new filetype plugin in a directory from the end of
|
|
|
|
'runtimepath'. For Unix, for example, you could use this file: >
|
2015-10-17 07:25:53 -07:00
|
|
|
vim ~/.config/nvim/after/ftplugin/fortran.vim
|
2023-08-09 10:20:18 -07:00
|
|
|
< In this file you can change just those settings that you want to change.
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
==============================================================================
|
|
|
|
3. Docs for the default filetype plugins. *ftplugin-docs*
|
|
|
|
|
|
|
|
|
2023-09-06 14:50:17 -07:00
|
|
|
*plugin_exec* *g:plugin_exec*
|
|
|
|
Enable executing of external commands. This was done historically for e.g.
|
|
|
|
the perl filetype plugin (and a few others) to set the search path.
|
|
|
|
Disabled by default for security reasons: >
|
|
|
|
:let g:plugin_exec = 1
|
|
|
|
It is also possible to enable this only for certain filetypes: >
|
|
|
|
:let g:<filetype>_exec = 1
|
|
|
|
So to enable this only for ruby, set the following variable: >
|
|
|
|
:let g:ruby_exec = 1
|
|
|
|
|
|
|
|
If both, the global `plugin_exec` and the `<filetype>_exec` specific variable
|
2023-10-02 15:20:44 -07:00
|
|
|
are set, the filetype specific variable should have precedent.
|
2023-09-06 14:50:17 -07:00
|
|
|
|
2024-04-03 15:19:13 -07:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2024-05-20 05:15:53 -07:00
|
|
|
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
|
|
|
|
|
|
|
|
|
2021-04-30 22:39:00 -07:00
|
|
|
AWK *ft-awk-plugin*
|
|
|
|
|
|
|
|
Support for features specific to GNU Awk, like @include, can be enabled by
|
|
|
|
setting: >
|
2023-09-06 14:50:17 -07:00
|
|
|
:let g:awk_is_gawk = 1
|
2021-04-30 22:39:00 -07:00
|
|
|
|
|
|
|
|
2014-07-10 21:05:51 -07:00
|
|
|
CHANGELOG *ft-changelog-plugin*
|
|
|
|
|
|
|
|
Allows for easy entrance of Changelog entries in Changelog files. There are
|
|
|
|
some commands, mappings, and variables worth exploring:
|
|
|
|
|
|
|
|
Options:
|
|
|
|
'comments' is made empty to not mess up formatting.
|
|
|
|
'textwidth' is set to 78, which is standard.
|
|
|
|
'formatoptions' the 't' flag is added to wrap when inserting text.
|
|
|
|
|
|
|
|
Commands:
|
|
|
|
NewChangelogEntry Adds a new Changelog entry in an intelligent fashion
|
|
|
|
(see below).
|
|
|
|
|
|
|
|
Local mappings:
|
|
|
|
<Leader>o Starts a new Changelog entry in an equally intelligent
|
|
|
|
fashion (see below).
|
|
|
|
|
|
|
|
Global mappings:
|
|
|
|
NOTE: The global mappings are accessed by sourcing the
|
|
|
|
ftplugin/changelog.vim file first, e.g. with >
|
|
|
|
runtime ftplugin/changelog.vim
|
2015-10-17 07:25:53 -07:00
|
|
|
< in your |init.vim|.
|
2014-07-10 21:05:51 -07:00
|
|
|
<Leader>o Switches to the ChangeLog buffer opened for the
|
|
|
|
current directory, or opens it in a new buffer if it
|
|
|
|
exists in the current directory. Then it does the
|
|
|
|
same as the local <Leader>o described above.
|
|
|
|
|
|
|
|
Variables:
|
|
|
|
g:changelog_timeformat Deprecated; use g:changelog_dateformat instead.
|
|
|
|
g:changelog_dateformat The date (and time) format used in ChangeLog entries.
|
|
|
|
The format accepted is the same as for the
|
|
|
|
|strftime()| function.
|
|
|
|
The default is "%Y-%m-%d" which is the standard format
|
|
|
|
for many ChangeLog layouts.
|
|
|
|
g:changelog_username The name and email address of the user.
|
|
|
|
The default is deduced from environment variables and
|
|
|
|
system files. It searches /etc/passwd for the comment
|
|
|
|
part of the current user, which informally contains
|
|
|
|
the real name of the user up to the first separating
|
|
|
|
comma. then it checks the $NAME environment variable
|
|
|
|
and finally runs `whoami` and `hostname` to build an
|
|
|
|
email address. The final form is >
|
|
|
|
Full Name <user@host>
|
|
|
|
<
|
|
|
|
g:changelog_new_date_format
|
|
|
|
The format to use when creating a new date-entry.
|
|
|
|
The following table describes special tokens in the
|
|
|
|
string:
|
|
|
|
%% insert a single '%' character
|
|
|
|
%d insert the date from above
|
|
|
|
%u insert the user from above
|
2024-02-25 01:38:34 -07:00
|
|
|
%p insert result of b:changelog_entry_prefix
|
2014-07-10 21:05:51 -07:00
|
|
|
%c where to position cursor when done
|
|
|
|
The default is "%d %u\n\n\t* %p%c\n\n", which produces
|
|
|
|
something like (| is where cursor will be, unless at
|
|
|
|
the start of the line where it denotes the beginning
|
|
|
|
of the line) >
|
|
|
|
|2003-01-14 Full Name <user@host>
|
|
|
|
|
|
|
|
|
| * prefix|
|
|
|
|
<
|
|
|
|
g:changelog_new_entry_format
|
|
|
|
The format used when creating a new entry.
|
|
|
|
The following table describes special tokens in the
|
|
|
|
string:
|
2024-02-25 01:38:34 -07:00
|
|
|
%p insert result of b:changelog_entry_prefix
|
2014-07-10 21:05:51 -07:00
|
|
|
%c where to position cursor when done
|
|
|
|
The default is "\t*%c", which produces something
|
|
|
|
similar to >
|
|
|
|
| * prefix|
|
|
|
|
<
|
|
|
|
g:changelog_date_entry_search
|
|
|
|
The search pattern to use when searching for a
|
|
|
|
date-entry.
|
|
|
|
The same tokens that can be used for
|
|
|
|
g:changelog_new_date_format can be used here as well.
|
|
|
|
The default is '^\s*%d\_s*%u' which finds lines
|
|
|
|
matching the form >
|
|
|
|
|2003-01-14 Full Name <user@host>
|
|
|
|
< and some similar formats.
|
|
|
|
|
|
|
|
g:changelog_date_end_entry_search
|
|
|
|
The search pattern to use when searching for the end
|
|
|
|
of a date-entry.
|
|
|
|
The same tokens that can be used for
|
|
|
|
g:changelog_new_date_format can be used here as well.
|
|
|
|
The default is '^\s*$' which finds lines that contain
|
|
|
|
only whitespace or are completely empty.
|
|
|
|
|
|
|
|
b:changelog_name *b:changelog_name*
|
|
|
|
Name of the ChangeLog file to look for.
|
|
|
|
The default is 'ChangeLog'.
|
|
|
|
|
|
|
|
b:changelog_path
|
|
|
|
Path of the ChangeLog to use for the current buffer.
|
|
|
|
The default is empty, thus looking for a file named
|
|
|
|
|b:changelog_name| in the same directory as the
|
|
|
|
current buffer. If not found, the parent directory of
|
|
|
|
the current buffer is searched. This continues
|
|
|
|
recursively until a file is found or there are no more
|
|
|
|
parent directories to search.
|
|
|
|
|
|
|
|
b:changelog_entry_prefix
|
|
|
|
Name of a function to call to generate a prefix to a
|
|
|
|
new entry. This function takes no arguments and
|
|
|
|
should return a string containing the prefix.
|
|
|
|
Returning an empty prefix is fine.
|
|
|
|
The default generates the shortest path between the
|
|
|
|
ChangeLog's pathname and the current buffers pathname.
|
|
|
|
In the future, it will also be possible to use other
|
|
|
|
variable contexts for this variable, for example, g:.
|
|
|
|
|
|
|
|
The Changelog entries are inserted where they add the least amount of text.
|
|
|
|
After figuring out the current date and user, the file is searched for an
|
|
|
|
entry beginning with the current date and user and if found adds another item
|
|
|
|
under it. If not found, a new entry and item is prepended to the beginning of
|
|
|
|
the Changelog.
|
|
|
|
|
|
|
|
|
|
|
|
FORTRAN *ft-fortran-plugin*
|
|
|
|
|
|
|
|
Options:
|
|
|
|
'expandtab' is switched on to avoid tabs as required by the Fortran
|
2015-10-17 07:25:53 -07:00
|
|
|
standards unless the user has set fortran_have_tabs in vimrc.
|
2023-12-06 00:51:09 -07:00
|
|
|
'textwidth' is set to 80 for fixed source format whereas it is set to 132
|
|
|
|
for free source format. Setting the fortran_extended_line_length
|
|
|
|
variable increases the width to 132 for fixed source format.
|
2014-07-10 21:05:51 -07:00
|
|
|
'formatoptions' is set to break code and comment lines and to preserve long
|
|
|
|
lines. You can format comments with |gq|.
|
|
|
|
For further discussion of fortran_have_tabs and the method used for the
|
|
|
|
detection of source format see |ft-fortran-syntax|.
|
|
|
|
|
2022-07-02 02:06:03 -07:00
|
|
|
|
|
|
|
FREEBASIC *ft-freebasic-plugin*
|
|
|
|
|
|
|
|
This plugin aims to treat the four FreeBASIC dialects, "fb", "qb", "fblite"
|
|
|
|
and "deprecated", as distinct languages.
|
|
|
|
|
|
|
|
The dialect will be set to the first name found in g:freebasic_forcelang, any
|
|
|
|
#lang directive or $lang metacommand in the file being edited, or finally
|
|
|
|
g:freebasic_lang. These global variables conceptually map to the fbc options
|
|
|
|
-forcelang and -lang. If no dialect is explicitly specified "fb" will be
|
|
|
|
used.
|
|
|
|
|
|
|
|
For example, to set the dialect to a default of "fblite" but still allow for
|
|
|
|
any #lang directive overrides, use the following command: >
|
|
|
|
|
2022-11-10 02:05:25 -07:00
|
|
|
let g:freebasic_lang = "fblite"
|
2022-07-02 02:06:03 -07:00
|
|
|
|
|
|
|
|
2024-07-16 13:26:43 -07:00
|
|
|
GDSCRIPT *ft-gdscript-plugin*
|
|
|
|
|
|
|
|
By default the following options are set, based on Godot official docs: >
|
|
|
|
|
|
|
|
setlocal noexpandtab softtabstop=0 shiftwidth=0
|
|
|
|
|
|
|
|
To disable this behavior, set the following variable in your vimrc: >
|
|
|
|
|
|
|
|
let g:gdscript_recommended_style = 0
|
|
|
|
|
|
|
|
|
2024-12-05 16:22:44 -07:00
|
|
|
GIT COMMIT *ft-gitcommit-plugin*
|
2014-07-10 21:05:51 -07:00
|
|
|
|
|
|
|
One command, :DiffGitCached, is provided to show a diff of the current commit
|
|
|
|
in the preview window. It is equivalent to calling "git diff --cached" plus
|
|
|
|
any arguments given to the command.
|
|
|
|
|
2022-07-02 02:06:03 -07:00
|
|
|
|
2024-07-16 13:28:32 -07:00
|
|
|
GO *ft-go-plugin*
|
|
|
|
|
|
|
|
By default the following options are set, based on Golang official docs: >
|
|
|
|
|
|
|
|
setlocal noexpandtab softtabstop=0 shiftwidth=0
|
|
|
|
|
|
|
|
To disable this behavior, set the following variable in your vimrc: >
|
|
|
|
|
|
|
|
let g:go_recommended_style = 0
|
|
|
|
|
|
|
|
|
2021-10-05 05:12:16 -07:00
|
|
|
GPROF *ft-gprof-plugin*
|
2021-09-22 06:12:06 -07:00
|
|
|
|
|
|
|
The gprof filetype plugin defines a mapping <C-]> to jump from a function
|
|
|
|
entry in the gprof flat profile or from a function entry in the call graph
|
|
|
|
to the details of that function in the call graph.
|
|
|
|
|
|
|
|
The mapping can be disabled with: >
|
|
|
|
let g:no_gprof_maps = 1
|
2014-07-10 21:05:51 -07:00
|
|
|
|
2022-07-02 02:06:03 -07:00
|
|
|
|
2024-05-25 16:11:50 -07:00
|
|
|
HARE *ft-hare*
|
|
|
|
|
|
|
|
Since the text for this plugin is rather long it has been put in a separate
|
|
|
|
file: |ft_hare.txt|.
|
|
|
|
|
2024-11-12 13:54:06 -07:00
|
|
|
IDRIS2 *ft-idris2-plugin*
|
|
|
|
|
|
|
|
By default the following options are set: >
|
|
|
|
|
|
|
|
setlocal shiftwidth=2 tabstop=2 expandtab
|
|
|
|
setlocal comments=s1:{-,mb:-,ex:-},:\|\|\|,:--
|
|
|
|
setlocal commentstring=--\ %s
|
|
|
|
setlocal wildignore+=*.ibc
|
|
|
|
|
|
|
|
To use tabs instead of spaces for indentation, set the following variable
|
|
|
|
in your vimrc: >
|
|
|
|
|
|
|
|
let g:idris2#allow_tabchar = 1
|
2024-05-25 16:11:50 -07:00
|
|
|
|
2024-04-18 23:49:33 -07:00
|
|
|
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
|
|
|
|
<
|
2024-09-30 22:00:12 -07:00
|
|
|
Markdown documentation comments may contain common runs of vertical leading
|
|
|
|
whitespace following the comment marks (`///`) for aesthetic reasons; however,
|
|
|
|
some horizontal runs of leading whitespace are significant in Markdown because
|
|
|
|
they denote code blocks etc. For convenience, a 'formatexpr' function is
|
|
|
|
provided for the |gq| operator. As long as neither "g:java_ignore_javadoc"
|
|
|
|
nor "g:java_ignore_markdown" is defined, the reformatting of Markdown comments
|
|
|
|
can be enabled on demand with: >
|
|
|
|
setlocal formatexpr=g:javaformat#RemoveCommonMarkdownWhitespace()
|
|
|
|
<
|
|
|
|
Or for Vim versions less than `7.4.265`, with: >
|
|
|
|
setlocal formatexpr=javaformat#RemoveCommonMarkdownWhitespace()
|
|
|
|
<
|
|
|
|
This function accepts a range of lines, removes a common run of vertical
|
|
|
|
leading whitespace, and rewrites the lines of the range. Depending on the
|
|
|
|
author's layout style and the comment contents, which lines to select for
|
|
|
|
reformatting can vary from the whole comment to only some portion of it.
|
|
|
|
To enable the recognition of Markdown comments each time after removing
|
|
|
|
"g:java_ignore_markdown" or "g:java_ignore_javadoc", remember to manually
|
|
|
|
re-source "javaformat.vim" for Vim versions greater than `8.2.1397`: >
|
|
|
|
runtime autoload/javaformat.vim
|
|
|
|
<
|
2024-04-18 23:49:33 -07:00
|
|
|
|
2014-07-10 21:05:51 -07:00
|
|
|
MAIL *ft-mail-plugin*
|
|
|
|
|
|
|
|
Options:
|
|
|
|
'modeline' is switched off to avoid the danger of trojan horses, and to
|
|
|
|
avoid that a Subject line with "Vim:" in it will cause an
|
|
|
|
error message.
|
|
|
|
'textwidth' is set to 72. This is often recommended for e-mail.
|
man.vim: rewrite
- Smart autocomplete. It's automatically sorted, filtered for duplicates
and even formats the candidates based on what is needed. For example,
`:Man 1 printf<TAB>` will show the pages that are in section 1m as
'page(sect)' to let you know they are in a more specific section.
- Instead of trying to unset $MANPAGER we use the -P flag to set the
pager to cat
- Always use the section arg '-s', it makes the code much simpler
(see comment in s:man-args).
- A manpage name starting with '-' is invalid. It's fine for sections
because of the use of '-s'.
- The tagstack is an actual stack now, makes it much simpler.
- By using v:count and v:count1, the plugin can explicitly check whether
the user set a count, instead of relying on a default value (0) that
is actually a real manpage section.
- Extraction of a manpage reference is much more simple. No giant long
complicated regexes. Now, the plugin lets `man` handle the actual
validation. We merely extract the section and page. Syntax regexes are
a bit more specific though to prevent highlighting everything.
- Multilingual support in the syntax file. Removed the cruft that was only
relevent to vim. Also simplified and improved many of the regexes.
- Using shellescape when sending the page and sect as arguments
- In general, the code flow is much more obvious.
- man#get_page has been split up into smaller functions with explicit
responsibilties
- ':help' behavior in opening splits and manpages
- Comments explaining anything that needs explaining and isn't
immediately obvious.
- If a manpage has already been loaded but if it were to reloaded at the
current width which is the same as the width at which it was loaded at
previously, it is not reloaded.
- Use substitute to remove the backspaced instead of `col -b`, as the
latter doesn't work with other languages.
- Open paths to manpages
- It uses cWORD instead of cword to get the manpage under the cursor, this
helps with files that do not have (,) in iskeyword. It also means the
plugin does not set iskeyword locally anymore.
- <Plug>(Man) mapping for easy remapping
- Switched to single quotes wherever possible.
- Updated docs in $VIMRUNTIME/doc/filetype.txt (still need to update
user-manual)
- Always call tolower on section name. See comment in
s:extract_page_and_sect_fpage
- Formatting/consistency cleanup
- Automatically map q to ':q<CR>' when invoked as $MANPAGER
- It also fully supports being used as $MANPAGER. Setting the name and
stuff automatically.
- Split up the setlocals into multiple lines for easier readability
- Better detection of errors by redirecting stderr to /dev/null. If an
error occured, stdout will be empty.
- Functions return [sect, page] not [page, sect]. Makes more sense with
how man takes the arguments as sect and then page.
- Pretty prints errors on a single line.
- If no section is given, automatically finds the correct section for
the buffer name. It also gets the correct page. See the comment in
s:get_page
- If $MANWIDTH is not set, do not assign directly to $MANWIDTH because
then $MANWIDTH will always stay set to the same value as we only use
winwidth(0) when the global $MANWIDTH is empty. Instead we set it
locally for the command.
- Maintainer notes on all files.
2016-03-14 02:05:28 -07:00
|
|
|
'formatoptions' is set to break text lines and to repeat the comment leader
|
2014-07-10 21:05:51 -07:00
|
|
|
in new lines, so that a leading ">" for quotes is repeated.
|
|
|
|
You can also format quoted text with |gq|.
|
|
|
|
|
|
|
|
Local mappings:
|
|
|
|
<LocalLeader>q or \\MailQuote
|
|
|
|
Quotes the text selected in Visual mode, or from the cursor position
|
|
|
|
to the end of the file in Normal mode. This means "> " is inserted in
|
|
|
|
each line.
|
|
|
|
|
2022-09-02 07:20:29 -07:00
|
|
|
MAN *ft-man-plugin* *:Man* *man.lua*
|
2014-07-10 21:05:51 -07:00
|
|
|
|
2016-08-07 20:17:56 -07:00
|
|
|
View manpages in Nvim. Supports highlighting, completion, locales, and
|
|
|
|
navigation. Also see |find-manpage|.
|
2014-07-10 21:05:51 -07:00
|
|
|
|
2022-09-02 07:20:29 -07:00
|
|
|
man.lua will always attempt to reuse the closest man window (above/left) but
|
2016-08-07 20:17:56 -07:00
|
|
|
otherwise create a split.
|
|
|
|
|
2016-12-27 17:01:04 -07:00
|
|
|
The case sensitivity of completion is controlled by 'fileignorecase'.
|
|
|
|
|
2014-07-10 21:05:51 -07:00
|
|
|
Commands:
|
2016-08-07 20:17:56 -07:00
|
|
|
Man {name} Display the manpage for {name}.
|
|
|
|
Man {sect} {name} Display the manpage for {name} and section {sect}.
|
2018-10-21 08:38:25 -07:00
|
|
|
Man {name}({sect}) Same as above.
|
2016-08-04 20:22:51 -07:00
|
|
|
Man {sect} {name}({sect}) Used during completion to show the real section of
|
2016-08-07 20:17:56 -07:00
|
|
|
when the provided section is a prefix, e.g. 1m vs 1.
|
2018-10-21 08:38:25 -07:00
|
|
|
Man {path} Open the manpage at {path}. Prepend "./" if {path}
|
|
|
|
is relative to the current directory.
|
2016-09-03 18:53:58 -07:00
|
|
|
Man Open the manpage for the <cWORD> (man buffers)
|
|
|
|
or <cword> (non-man buffers) under the cursor.
|
2018-10-21 08:38:25 -07:00
|
|
|
Man! Display the current buffer contents as a manpage.
|
2016-08-07 20:17:56 -07:00
|
|
|
|
2024-03-15 18:00:25 -07:00
|
|
|
|:Man| accepts command modifiers. For example, to use a vertical split: >vim
|
2016-08-07 20:17:56 -07:00
|
|
|
:vertical Man printf
|
2024-03-15 18:00:25 -07:00
|
|
|
To reuse the current window: >vim
|
|
|
|
:hide Man printf
|
2016-08-04 20:22:51 -07:00
|
|
|
|
2014-07-10 21:05:51 -07:00
|
|
|
Local mappings:
|
2016-08-07 20:17:56 -07:00
|
|
|
K or CTRL-] Jump to the manpage for the <cWORD> under the
|
2016-08-04 20:22:51 -07:00
|
|
|
cursor. Takes a count for the section.
|
2016-08-07 20:17:56 -07:00
|
|
|
CTRL-T Jump back to the location that the manpage was
|
|
|
|
opened from.
|
2017-10-20 17:33:58 -07:00
|
|
|
gO Show the manpage outline. |gO|
|
2016-08-07 20:17:56 -07:00
|
|
|
q :quit if invoked as $MANPAGER, otherwise :close.
|
2016-05-03 12:10:30 -07:00
|
|
|
|
man.vim: rewrite
- Smart autocomplete. It's automatically sorted, filtered for duplicates
and even formats the candidates based on what is needed. For example,
`:Man 1 printf<TAB>` will show the pages that are in section 1m as
'page(sect)' to let you know they are in a more specific section.
- Instead of trying to unset $MANPAGER we use the -P flag to set the
pager to cat
- Always use the section arg '-s', it makes the code much simpler
(see comment in s:man-args).
- A manpage name starting with '-' is invalid. It's fine for sections
because of the use of '-s'.
- The tagstack is an actual stack now, makes it much simpler.
- By using v:count and v:count1, the plugin can explicitly check whether
the user set a count, instead of relying on a default value (0) that
is actually a real manpage section.
- Extraction of a manpage reference is much more simple. No giant long
complicated regexes. Now, the plugin lets `man` handle the actual
validation. We merely extract the section and page. Syntax regexes are
a bit more specific though to prevent highlighting everything.
- Multilingual support in the syntax file. Removed the cruft that was only
relevent to vim. Also simplified and improved many of the regexes.
- Using shellescape when sending the page and sect as arguments
- In general, the code flow is much more obvious.
- man#get_page has been split up into smaller functions with explicit
responsibilties
- ':help' behavior in opening splits and manpages
- Comments explaining anything that needs explaining and isn't
immediately obvious.
- If a manpage has already been loaded but if it were to reloaded at the
current width which is the same as the width at which it was loaded at
previously, it is not reloaded.
- Use substitute to remove the backspaced instead of `col -b`, as the
latter doesn't work with other languages.
- Open paths to manpages
- It uses cWORD instead of cword to get the manpage under the cursor, this
helps with files that do not have (,) in iskeyword. It also means the
plugin does not set iskeyword locally anymore.
- <Plug>(Man) mapping for easy remapping
- Switched to single quotes wherever possible.
- Updated docs in $VIMRUNTIME/doc/filetype.txt (still need to update
user-manual)
- Always call tolower on section name. See comment in
s:extract_page_and_sect_fpage
- Formatting/consistency cleanup
- Automatically map q to ':q<CR>' when invoked as $MANPAGER
- It also fully supports being used as $MANPAGER. Setting the name and
stuff automatically.
- Split up the setlocals into multiple lines for easier readability
- Better detection of errors by redirecting stderr to /dev/null. If an
error occured, stdout will be empty.
- Functions return [sect, page] not [page, sect]. Makes more sense with
how man takes the arguments as sect and then page.
- Pretty prints errors on a single line.
- If no section is given, automatically finds the correct section for
the buffer name. It also gets the correct page. See the comment in
s:get_page
- If $MANWIDTH is not set, do not assign directly to $MANWIDTH because
then $MANWIDTH will always stay set to the same value as we only use
winwidth(0) when the global $MANWIDTH is empty. Instead we set it
locally for the command.
- Maintainer notes on all files.
2016-03-14 02:05:28 -07:00
|
|
|
Variables:
|
2016-08-07 20:17:56 -07:00
|
|
|
*g:no_man_maps* Do not create mappings in manpage buffers.
|
|
|
|
*g:ft_man_folding_enable* Fold manpages with foldmethod=indent foldnestmax=1.
|
2016-08-24 08:56:33 -07:00
|
|
|
*b:man_default_sects* Comma-separated, ordered list of preferred sections.
|
|
|
|
For example in C one usually wants section 3 or 2: >
|
|
|
|
:let b:man_default_sections = '3,2'
|
2019-11-24 17:50:08 -07:00
|
|
|
*g:man_hardwrap* Hard-wrap to $MANWIDTH or window width if $MANWIDTH is
|
2019-11-24 17:55:38 -07:00
|
|
|
empty. Enabled by default. Set |FALSE| to enable soft
|
2019-11-24 17:50:08 -07:00
|
|
|
wrapping.
|
2014-07-10 21:05:51 -07:00
|
|
|
|
2024-03-15 18:00:25 -07:00
|
|
|
To use Nvim as a manpager: >sh
|
2019-08-27 16:38:58 -07:00
|
|
|
export MANPAGER='nvim +Man!'
|
|
|
|
|
|
|
|
Note that when running `man` from the shell and with that `MANPAGER` in your
|
2023-06-22 03:44:51 -07:00
|
|
|
environment, `man` will pre-format the manpage using `groff`. Thus, Nvim
|
2019-08-27 16:38:58 -07:00
|
|
|
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
|
2024-03-15 18:00:25 -07:00
|
|
|
soft wrapped as with `g:man_hardwrap=0`. You can set in your environment: >sh
|
2019-08-27 16:38:58 -07:00
|
|
|
export MANWIDTH=999
|
|
|
|
|
2019-11-24 17:55:38 -07:00
|
|
|
So `groff`'s pre-formatting output will be the same as with `g:man_hardwrap=0` i.e soft-wrapped.
|
2019-08-27 16:38:58 -07:00
|
|
|
|
2019-11-24 17:50:08 -07:00
|
|
|
To disable bold highlighting: >
|
|
|
|
:highlight link manBold Normal
|
|
|
|
|
2024-03-15 18:00:25 -07:00
|
|
|
An alternative to using `MANPAGER` in shell can be redefined `man`, for example: >sh
|
|
|
|
man() {
|
|
|
|
nvim "+hide Man $1"
|
|
|
|
}
|
2021-05-02 07:24:39 -07:00
|
|
|
|
2024-12-05 16:22:44 -07:00
|
|
|
MARKDOWN *ft-markdown-plugin*
|
2021-05-02 07:24:39 -07:00
|
|
|
|
|
|
|
To enable folding use this: >
|
2021-09-09 09:59:11 -07:00
|
|
|
let g:markdown_folding = 1
|
2023-02-21 08:50:29 -07:00
|
|
|
|
|
|
|
'expandtab' will be set by default. If you do not want that use this: >
|
|
|
|
let g:markdown_recommended_style = 0
|
|
|
|
|
2021-05-02 07:24:39 -07:00
|
|
|
|
2024-11-15 00:40:22 -07:00
|
|
|
ORG *ft-org-plugin*
|
|
|
|
|
|
|
|
To enable folding use this: >
|
|
|
|
let g:org_folding = 1
|
|
|
|
<
|
|
|
|
|
2014-07-10 21:05:51 -07:00
|
|
|
PDF *ft-pdf-plugin*
|
|
|
|
|
|
|
|
Two maps, <C-]> and <C-T>, are provided to simulate a tag stack for navigating
|
|
|
|
the PDF. The following are treated as tags:
|
|
|
|
|
|
|
|
- The byte offset after "startxref" to the xref table
|
|
|
|
- The byte offset after the /Prev key in the trailer to an earlier xref table
|
|
|
|
- A line of the form "0123456789 00000 n" in the xref table
|
|
|
|
- An object reference like "1 0 R" anywhere in the PDF
|
|
|
|
|
|
|
|
These maps can be disabled with >
|
|
|
|
:let g:no_pdf_maps = 1
|
|
|
|
<
|
|
|
|
|
2017-04-28 12:38:29 -07:00
|
|
|
PYTHON *ft-python-plugin* *PEP8*
|
|
|
|
|
|
|
|
By default the following options are set, in accordance with PEP8: >
|
|
|
|
|
|
|
|
setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
|
|
|
|
|
2018-10-29 15:38:41 -07:00
|
|
|
To disable this behavior, set the following variable in your vimrc: >
|
2018-10-28 06:05:39 -07:00
|
|
|
|
2017-04-28 12:38:29 -07:00
|
|
|
let g:python_recommended_style = 0
|
|
|
|
|
2023-04-29 09:22:26 -07:00
|
|
|
QUERY *ft-query-plugin*
|
|
|
|
|
|
|
|
|
2024-01-28 18:53:14 -07:00
|
|
|
Linting of treesitter queries for installed parsers using
|
2023-06-27 10:21:27 -07:00
|
|
|
|vim.treesitter.query.lint()| is enabled by default on `BufEnter` and
|
|
|
|
`BufWrite`. To change the events that trigger linting, use >lua
|
2023-04-29 09:22:26 -07:00
|
|
|
|
|
|
|
vim.g.query_lint_on = { 'InsertLeave', 'TextChanged' }
|
|
|
|
<
|
|
|
|
To disable linting completely, set >lua
|
|
|
|
|
|
|
|
vim.g.query_lint_on = {}
|
|
|
|
<
|
2017-04-28 12:38:29 -07:00
|
|
|
|
2019-08-01 22:10:36 -07:00
|
|
|
QF QUICKFIX *qf.vim* *ft-qf-plugin*
|
|
|
|
|
|
|
|
The "qf" filetype is used for the quickfix window, see |quickfix-window|.
|
|
|
|
|
|
|
|
The quickfix filetype plugin includes configuration for displaying the command
|
|
|
|
that produced the quickfix list in the |status-line|. To disable this setting,
|
|
|
|
configure as follows: >
|
|
|
|
:let g:qf_disable_statusline = 1
|
|
|
|
|
|
|
|
|
2018-10-29 15:38:41 -07:00
|
|
|
R MARKDOWN *ft-rmd-plugin*
|
|
|
|
|
|
|
|
By default ftplugin/html.vim is not sourced. If you want it sourced, add to
|
|
|
|
your |vimrc|: >
|
|
|
|
let rmd_include_html = 1
|
|
|
|
|
|
|
|
The 'formatexpr' option is set dynamically with different values for R code
|
|
|
|
and for Markdown code. If you prefer that 'formatexpr' is not set, add to your
|
|
|
|
|vimrc|: >
|
|
|
|
let rmd_dynamic_comments = 0
|
|
|
|
|
|
|
|
|
|
|
|
R RESTRUCTURED TEXT *ft-rrst-plugin*
|
|
|
|
|
|
|
|
The 'formatexpr' option is set dynamically with different values for R code
|
|
|
|
and for ReStructured text. If you prefer that 'formatexpr' is not set, add to
|
|
|
|
your |vimrc|: >
|
|
|
|
let rrst_dynamic_comments = 0
|
|
|
|
|
|
|
|
|
2019-08-01 07:45:37 -07:00
|
|
|
RESTRUCTUREDTEXT *ft-rst-plugin*
|
|
|
|
|
|
|
|
The following formatting setting are optionally available: >
|
|
|
|
setlocal expandtab shiftwidth=3 softtabstop=3 tabstop=8
|
|
|
|
|
|
|
|
To enable this behavior, set the following variable in your vimrc: >
|
|
|
|
let g:rst_style = 1
|
|
|
|
|
|
|
|
|
2024-12-05 16:22:44 -07:00
|
|
|
RNOWEB *ft-rnoweb-plugin*
|
2023-12-26 11:05:36 -07:00
|
|
|
|
|
|
|
The 'formatexpr' option is set dynamically with different values for R code
|
|
|
|
and for LaTeX code. If you prefer that 'formatexpr' is not set, add to your
|
|
|
|
|vimrc|: >
|
|
|
|
let rnw_dynamic_comments = 0
|
|
|
|
|
|
|
|
|
2014-07-10 21:05:51 -07:00
|
|
|
RPM SPEC *ft-spec-plugin*
|
|
|
|
|
|
|
|
Since the text for this plugin is rather long it has been put in a separate
|
|
|
|
file: |pi_spec.txt|.
|
|
|
|
|
|
|
|
|
2015-09-09 12:20:03 -07:00
|
|
|
SHADA *ft-shada*
|
|
|
|
|
2023-07-25 05:07:13 -07:00
|
|
|
Allows editing binary |shada-file|s in a nice way. Opened binary files are
|
2015-09-09 12:20:03 -07:00
|
|
|
displayed in the following format: >
|
|
|
|
|
|
|
|
Type with timestamp YYYY-mm-ddTHH:MM:SS:
|
|
|
|
% Key__ Description___ Value
|
|
|
|
+ fooba foo bar baz fo {msgpack-value}
|
|
|
|
+ abcde abc def ghi jk {msgpack-value}
|
|
|
|
Other type with timestamp YYYY-mm-ddTHH:MM:SS:
|
|
|
|
@ Description__ Value
|
|
|
|
- foo bar baz t {msgpack-value}
|
|
|
|
# Expected more elements in list
|
|
|
|
Some other type with timestamp YYYY-mm-ddTHH:MM:SS:
|
|
|
|
# Unexpected type: type instead of map
|
|
|
|
= {msgpack-value}
|
|
|
|
|
2023-07-25 05:07:13 -07:00
|
|
|
Filetype plugin defines all |Cmd-event|s. Defined |SourceCmd| event makes
|
|
|
|
"source file.shada" be equivalent to "|:rshada| file.shada". |BufWriteCmd|,
|
|
|
|
|FileWriteCmd| and |FileAppendCmd| events are affected by the following
|
2015-09-09 12:20:03 -07:00
|
|
|
settings:
|
|
|
|
|
2023-07-25 05:07:13 -07:00
|
|
|
*g:shada#keep_old_header* Boolean, if set to false all header entries
|
2015-09-09 12:20:03 -07:00
|
|
|
are ignored when writing. Defaults to 1.
|
2023-07-25 05:07:13 -07:00
|
|
|
*g:shada#add_own_header* Boolean, if set to true first written entry
|
|
|
|
will always be header entry with two values in
|
|
|
|
a map with attached data: |v:version| attached
|
|
|
|
to "version" key and "shada.vim" attached to
|
2015-09-09 12:20:03 -07:00
|
|
|
"generator" key. Defaults to 1.
|
|
|
|
|
|
|
|
Format description:
|
|
|
|
|
2023-07-25 05:07:13 -07:00
|
|
|
1. `#` starts a comment. Lines starting with space characters and then `#`
|
|
|
|
are ignored. Plugin may only add comment lines to indicate some errors in
|
|
|
|
ShaDa format. Lines containing no non-whitespace characters are also
|
2015-09-09 12:20:03 -07:00
|
|
|
ignored.
|
2023-07-25 05:07:13 -07:00
|
|
|
2. Each entry starts with line that has format "{type} with timestamp
|
|
|
|
{timestamp}:". {timestamp} is |strftime()|-formatted string representing
|
2016-01-15 15:05:43 -07:00
|
|
|
actual Unix timestamp value. First strftime() argument is equal to
|
2023-07-25 05:07:13 -07:00
|
|
|
`%Y-%m-%dT%H:%M:%S`. When writing this timestamp is parsed using
|
|
|
|
|msgpack#strptime()|, with caching (it remembers which timestamp produced
|
|
|
|
particular strftime() output and uses this value if you did not change
|
2015-09-09 12:20:03 -07:00
|
|
|
timestamp). {type} is one of
|
|
|
|
1 - Header
|
|
|
|
2 - Search pattern
|
|
|
|
3 - Replacement string
|
|
|
|
4 - History entry
|
|
|
|
5 - Register
|
|
|
|
6 - Variable
|
|
|
|
7 - Global mark
|
|
|
|
8 - Jump
|
|
|
|
9 - Buffer list
|
|
|
|
10 - Local mark
|
|
|
|
11 - Change
|
|
|
|
* - Unknown (0x{type-hex})
|
|
|
|
|
2023-07-25 05:07:13 -07:00
|
|
|
Each type may be represented using Unknown entry: "Jump with timestamp ..."
|
2015-09-09 12:20:03 -07:00
|
|
|
is the same as "Unknown (0x8) with timestamp ....".
|
|
|
|
3. After header there is one of the following lines:
|
2023-07-25 05:07:13 -07:00
|
|
|
1. " % Key__ Description__ Value": map header. After mapping header
|
|
|
|
follows a table which may contain comments and lines consisting of
|
|
|
|
" +", key, description and |{msgpack-value}|. Key is separated by at
|
|
|
|
least two spaces with description, description is separated by at least
|
|
|
|
two spaces with the value. Each key in the map must be at most as wide
|
|
|
|
as "Key__" header: "Key" allows at most 3-byte keys, "Key__" allows at
|
|
|
|
most 5-byte keys. If keys actually occupy less bytes then the rest is
|
|
|
|
filled with spaces. Keys cannot be empty, end with spaces, contain two
|
|
|
|
consequent spaces inside of them or contain multibyte characters (use
|
|
|
|
"=" format if you need this). Descriptions have the same restrictions
|
|
|
|
on width and contents, except that empty descriptions are allowed.
|
2015-09-09 12:20:03 -07:00
|
|
|
Description column may be omitted.
|
|
|
|
|
2023-07-25 05:07:13 -07:00
|
|
|
When writing description is ignored. Keys with values |msgpack#equal|
|
|
|
|
to default ones are ignored. Order of keys is preserved. All keys are
|
2015-09-09 12:20:03 -07:00
|
|
|
treated as strings (not binary strings).
|
|
|
|
|
2023-07-25 05:07:13 -07:00
|
|
|
Note: specifically for buffer list entries it is allowed to have more
|
|
|
|
then one map header. Each map header starts a new map entry inside
|
2015-09-09 12:20:03 -07:00
|
|
|
buffer list because ShaDa buffer list entry is an array of maps. I.e. >
|
|
|
|
|
|
|
|
Buffer list with timestamp 1970-01-01T00:00:00:
|
|
|
|
% Key Description Value
|
|
|
|
+ f file name "/foo"
|
|
|
|
+ l line number 1
|
|
|
|
+ c column 10
|
|
|
|
<
|
|
|
|
is equivalent to >
|
|
|
|
|
|
|
|
Buffer list with timestamp 1970-01-01T00:00:00:
|
|
|
|
= [{="f": "/foo", ="c": 10}]
|
|
|
|
<
|
|
|
|
and >
|
|
|
|
|
|
|
|
Buffer list with timestamp 1970-01-01T00:00:00:
|
|
|
|
% Key Description Value
|
|
|
|
+ f file name "/foo"
|
|
|
|
|
|
|
|
% Key Description Value
|
|
|
|
+ f file name "/bar"
|
|
|
|
<
|
|
|
|
is equivalent to >
|
|
|
|
|
|
|
|
Buffer list with timestamp 1970-01-01T00:00:00:
|
|
|
|
= [{="f": "/foo"}, {="f": "/bar"}]
|
|
|
|
<
|
2023-07-25 05:07:13 -07:00
|
|
|
Note 2: specifically for register entries special syntax for arrays was
|
2015-09-09 12:20:03 -07:00
|
|
|
designed: >
|
|
|
|
|
|
|
|
Register with timestamp 1970-01-01T00:00:00:
|
|
|
|
% Key Description Value
|
|
|
|
+ rc contents @
|
|
|
|
| - "line1"
|
|
|
|
| - "line2"
|
|
|
|
<
|
|
|
|
This is equivalent to >
|
|
|
|
|
|
|
|
Register with timestamp 1970-01-01T00:00:00:
|
|
|
|
% Key Description Value
|
|
|
|
+ rc contents ["line1", "line2"]
|
|
|
|
<
|
2023-07-25 05:07:13 -07:00
|
|
|
Such syntax is automatically used if array representation appears to be
|
2015-09-09 12:20:03 -07:00
|
|
|
too lengthy.
|
2023-07-25 05:07:13 -07:00
|
|
|
2. " @ Description__ Value": array header. Same as map, but key is
|
|
|
|
omitted and description cannot be omitted. Array entries start with
|
2015-09-09 12:20:03 -07:00
|
|
|
" -". Example: >
|
|
|
|
|
|
|
|
History entry with timestamp 1970-01-01T00:00:00:
|
|
|
|
@ Description_ Value
|
|
|
|
- history type SEARCH
|
|
|
|
- contents "foo"
|
|
|
|
- separator '/'
|
|
|
|
<
|
|
|
|
is equivalent to >
|
|
|
|
|
|
|
|
History entry with timestamp 1970-01-01T00:00:00:
|
|
|
|
= [SEARCH, "foo", '/']
|
|
|
|
<
|
|
|
|
Note: special array syntax for register entries is not recognized here.
|
2023-07-25 05:07:13 -07:00
|
|
|
3. " = {msgpack-value}": raw values. |{msgpack-value}| in this case may
|
|
|
|
have absolutely any type. Special array syntax for register entries is
|
2015-09-09 12:20:03 -07:00
|
|
|
not recognized here as well.
|
|
|
|
|
|
|
|
|
2017-11-06 16:46:08 -07:00
|
|
|
RUST *ft-rust*
|
|
|
|
|
|
|
|
Since the text for this plugin is rather long it has been put in a separate
|
|
|
|
file: |ft_rust.txt|.
|
|
|
|
|
|
|
|
|
2014-07-10 21:05:51 -07:00
|
|
|
SQL *ft-sql*
|
|
|
|
|
|
|
|
Since the text for this plugin is rather long it has been put in a separate
|
|
|
|
file: |ft_sql.txt|.
|
|
|
|
|
|
|
|
|
|
|
|
TEX *ft-tex-plugin* *g:tex_flavor*
|
|
|
|
|
2023-06-21 06:40:40 -07:00
|
|
|
If the first line of a `*.tex` file has the form >
|
2014-07-10 21:05:51 -07:00
|
|
|
%&<format>
|
|
|
|
then this determined the file type: plaintex (for plain TeX), context (for
|
|
|
|
ConTeXt), or tex (for LaTeX). Otherwise, the file is searched for keywords to
|
|
|
|
choose context or tex. If no keywords are found, it defaults to plaintex.
|
|
|
|
You can change the default by defining the variable g:tex_flavor to the format
|
|
|
|
(not the file type) you use most. Use one of these: >
|
|
|
|
let g:tex_flavor = "plain"
|
|
|
|
let g:tex_flavor = "context"
|
|
|
|
let g:tex_flavor = "latex"
|
|
|
|
Currently no other formats are recognized.
|
|
|
|
|
2024-07-15 11:02:22 -07:00
|
|
|
TYPST *ft-typst-plugin*
|
|
|
|
|
|
|
|
*g:typst_conceal*
|
|
|
|
When |TRUE| the Typst filetype plugin will set the 'conceallevel' option to 2.
|
2014-07-10 21:05:51 -07:00
|
|
|
|
2024-10-21 15:18:16 -07:00
|
|
|
*g:typst_folding*
|
|
|
|
When |TRUE| the Typst filetype plugin will fold headings. (default: |FALSE|)
|
|
|
|
|
|
|
|
To enable: >
|
|
|
|
let g:typst_folding = 1
|
|
|
|
<
|
|
|
|
*g:typst_foldnested*
|
2024-11-09 18:11:06 -07:00
|
|
|
When |TRUE| the Typst filetype plugin will fold nested heading under their
|
|
|
|
parents. (default: |TRUE|)
|
2024-10-21 15:18:16 -07:00
|
|
|
|
|
|
|
To disable: >
|
|
|
|
let g:typst_foldnested = 0
|
|
|
|
<
|
2018-10-28 05:51:36 -07:00
|
|
|
VIM *ft-vim-plugin*
|
|
|
|
|
|
|
|
The Vim filetype plugin defines mappings to move to the start and end of
|
|
|
|
functions with [[ and ]]. Move around comments with ]" and [".
|
|
|
|
|
|
|
|
The mappings can be disabled with: >
|
|
|
|
let g:no_vim_maps = 1
|
|
|
|
|
|
|
|
|
2024-05-21 16:51:51 -07:00
|
|
|
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.
|
|
|
|
|
|
|
|
|
2018-10-28 05:51:36 -07:00
|
|
|
ZIMBU *ft-zimbu-plugin*
|
|
|
|
|
|
|
|
The Zimbu filetype plugin defines mappings to move to the start and end of
|
|
|
|
functions with [[ and ]].
|
|
|
|
|
|
|
|
The mappings can be disabled with: >
|
|
|
|
let g:no_zimbu_maps = 1
|
|
|
|
<
|
|
|
|
|
|
|
|
|
2018-10-29 01:50:39 -07:00
|
|
|
vim:tw=78:ts=8:noet:ft=help:norl:
|