summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-02-03 17:36:27 +0100
committerBram Moolenaar <Bram@vim.org>2018-02-03 17:36:27 +0100
commitb7407d3fc9496f9048fb65ab17b5ba3444965c0e (patch)
treeea713a63c3771ff35b52aadef755102b55cc377d /runtime
parentddb349369d107c14fad9c38baf2f0e2b8514fbf0 (diff)
downloadvim-b7407d3fc9496f9048fb65ab17b5ba3444965c0e.zip
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.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/autocmd.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 4adf007e7..350ae7e88 100644
--- 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 change to a read-only
*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.