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: >
vim ~/.config/nvim/after/ftplugin/fortran.vim
< In this file you can change just those settings that you want to change.
==============================================================================
3. Docs for the default filetype plugins. *ftplugin-docs*
*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
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
setting: >
:let g:awk_is_gawk = 1
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
< in your |init.vim|.
<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
%p insert result of b:changelog_entry_prefix
%c where to position cursor when