diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/autocmd.txt | 19 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 9 |
2 files changed, 28 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|, diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 7b12d2082f..4ff0636b61 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1535,6 +1535,15 @@ v:oldfiles List of file names that is loaded from the |shada| file on than String this will cause trouble. {only when compiled with the |+shada| feature} + *v:option_new* +v:option_new New value of the option. Valid while executing an |OptionSet| + autocommand. + *v:option_old* +v:option_old Old value of the option. Valid while executing an |OptionSet| + autocommand. + *v:option_type* +v:option_type Scope of the set command. Valid while executing an + |OptionSet| autocommand. Can be either "global" or "local" *v:operator* *operator-variable* v:operator The last operator given in Normal mode. This is a single character except for commands starting with <g> or <z>, |