Mercurial > vim
diff runtime/doc/autocmd.txt @ 13170:6559e98f3e74 v8.0.1459
patch 8.0.1459: cannot handle change of directory
commit https://github.com/vim/vim/commit/b7407d3fc9496f9048fb65ab17b5ba3444965c0e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 3 17:36:27 2018 +0100
patch 8.0.1459: cannot handle change of directory
Problem: Cannot handle change of directory.
Solution: Add the DirChanged autocommand event. (Andy Massimino,
closes #888) Avoid changing directory for 'autochdir' too often.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 03 Feb 2018 17:45:05 +0100 |
parents | 59a16624400a |
children | 167a030448fa |
line wrap: on
line diff
--- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -295,6 +295,8 @@ Name triggered by ~ |FileChangedShellPost| After handling a file changed since editing started |FileChangedRO| before making the first change to a read-only file +|DirChanged| after the working directory has changed + |ShellCmdPost| after executing a shell command |ShellFilterPost| after filtering with a shell command @@ -633,6 +635,16 @@ FileChangedRO Before making the first *E881* If the number of lines changes saving for undo may fail and the change will be aborted. + *DirChanged* +DirChanged The working directory has changed in response + to the |:cd| or |:lcd| commands, or as a + result of the 'autochdir' option. + The pattern can be: + "window" to trigger on `:lcd + "global" to trigger on `:cd` + "auto" to trigger on 'autochdir'. + "drop" to trigger on editing a file + <afile> is set to the new directory name. *FileChangedShell* FileChangedShell When Vim notices that the modification time of a file has changed since editing started.