diff options
Diffstat (limited to 'runtime/doc/autocmd.txt')
-rw-r--r-- | runtime/doc/autocmd.txt | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 07158982f2..bf231044a0 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -69,6 +69,7 @@ Or use `:execute`: > :augroup mine | exe "au! BufRead *" | augroup END :augroup mine | exe "au BufRead * set tw=70" | augroup END +< *autocmd-expand* Note that special characters (e.g., "%", "<cword>") in the ":autocmd" arguments are not expanded when the autocommand is defined. These will be expanded when the Event is recognized, and the {cmd} is executed. The only @@ -275,14 +276,14 @@ BufRead or BufReadPost When starting to edit a new buffer, after processing modelines. See |BufWinEnter| to do something after processing modelines. Also triggered: - - when writing an unnamed buffer such that the - buffer gets a name + - when writing an unnamed buffer in a way that + the buffer gets a name - after successfully recovering a file - for the "filetypedetect" group when executing ":filetype detect" Not triggered: - - for ":r file" - - if the file doesn't exist + - for the `:read file` command + - when the file doesn't exist *BufReadCmd* BufReadCmd Before starting to edit a new buffer. Should read the file into the buffer. |Cmd-event| @@ -542,6 +543,15 @@ DirChangedPre When the |current-directory| is going to be switching window (or tab) <afile> is set to the new directory name. Non-recursive (event cannot trigger itself). + *ExitPre* +ExitPre When using `:quit`, `:wq` in a way it makes + Vim exit, or using `:qall`, just after + |QuitPre|. Can be used to close any + non-essential window. Exiting may still be + cancelled if there is a modified buffer that + isn't automatically saved, use |VimLeavePre| + for really exiting. + See also |QuitPre|, |WinClosed|. *FileAppendCmd* FileAppendCmd Before appending to a file. Should do the appending to the file. Use the '[ and '] @@ -568,15 +578,6 @@ FileChangedRO Before making the first change to a read-only *E881* If the number of lines changes saving for undo may fail and the change will be aborted. - *ExitPre* -ExitPre When using `:quit`, `:wq` in a way it makes - Vim exit, or using `:qall`, just after - |QuitPre|. Can be used to close any - non-essential window. Exiting may still be - cancelled if there is a modified buffer that - isn't automatically saved, use |VimLeavePre| - for really exiting. - See also |QuitPre|, |WinClosed|. *FileChangedShell* FileChangedShell When Vim notices that the modification time of a file has changed since editing started. |