diff options
author | watiko <service@mail.watiko.net> | 2015-11-27 23:56:52 +0900 |
---|---|---|
committer | watiko <service@mail.watiko.net> | 2015-11-28 17:22:28 +0900 |
commit | 119545190c1ec35e1c7b482f593b98d0fc485b6f (patch) | |
tree | 6a31debeb4826dd8c0e5f758d21ff5db25e66731 /runtime/doc/autocmd.txt | |
parent | b9139e009f3eb833ab57e73d1ecdbe68752112fe (diff) | |
download | rneovim-119545190c1ec35e1c7b482f593b98d0fc485b6f.tar.gz rneovim-119545190c1ec35e1c7b482f593b98d0fc485b6f.tar.bz2 rneovim-119545190c1ec35e1c7b482f593b98d0fc485b6f.zip |
vim-patch:7.4.786
Problem: It is not possible for a plugin to adjust to a changed setting.
Solution: Add the OptionSet autocommand event. (Christian Brabandt)
https://github.com/vim/vim/commit/537443018d41918639695a442c91b34ccec69fc3
Diffstat (limited to 'runtime/doc/autocmd.txt')
-rw-r--r-- | runtime/doc/autocmd.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index a0ed91c95d..38d53249d1 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -258,6 +258,7 @@ Name triggered by ~ |Syntax| when the 'syntax' option has been set |EncodingChanged| after the 'encoding' option has been changed |TermChanged| after the value of 'term' has changed +|OptionSet| after setting any option Startup and exit |VimEnter| after doing all the startup stuff @@ -745,6 +746,24 @@ MenuPopup Just before showing the popup menu (under the o Operator-pending i Insert c Command line + *OptionSet* +OptionSet After setting an option. The pattern is + matched against the long option name. + The |v:option_old| variable indicates the + old option value, |v:option_new| variable + indicates the newly set value, the + |v:option_type| variable indicates whether + it's global or local scoped and |<amatch>| + indicates what option has been set. + + Note: It's a bad idea, to reset an option + during this autocommand, since this will + probably break plugins. You can always use + |noa| to prevent triggering this autocommand. + Could be used, to check for existence of the + 'backupdir' and 'undodir' options and create + directories, if they don't exist yet. + *QuickFixCmdPre* QuickFixCmdPre Before a quickfix command is run (|:make|, |:lmake|, |:grep|, |:lgrep|, |:grepadd|, |