|Age||Commit message (Collapse)||Author||Files||Lines|
From :help hidden-options:
>Not all options are supported in all versions. This depends on the
>supported features and sometimes on the system. A remark about this is
>in curly braces below. When an option is not supported it may still be
>set without getting an error, this is called a hidden option. You can't
>get the value of a hidden option though, it is not stored.
>To test if option "foo" can be used with ":set" use something like this:
> if exists('&foo')
>This also returns true for a hidden option. To test if option "foo" is
>really supported use something like this:
> if exists('+foo')
Using BufReadPre meant that it was too early to set the 'syntax' option
locally for the buffer. This fixes that, and also works correctly for
cases where the buffer does not necessarily correspond to a file on
Set a g:loaded_* flag to prevent repeated reloads, and refuse to load at
all if &compatible is set or if required features are missing.
Some more accommodating plugins avoid the problems 'compatible' causes
by saving its value at startup into a script variable, setting the
option to the Vim default, and then restoring it when the plugin is
done, to prevent any of its flags from interfering in the plugin code:
let s:save_cpo = &cpo
let &cpo = s:save_cpo
I don't want this boilerplate, so I'm going to do what Tim Pope's
modules seem to, and just have the plugin refuse to do a single thing if
'compatible' is set.
Including renaming big_file.vim and accompanying functions yet again, to
Trying to keep complex autocmd and mapping definitions on long lines
broken up semantically; definition and options on one line, patterns or
mapping key on the next, and the command to run on the last.
Also trying to make sure that <silent>, <buffer>, and <unique> are
applied in the correct places, and that all mapping commands are using
the :<C-U> idiom for the command prefix.