Bram,
this patch adds the documentation suggestion from #1180 to the manual.
The basic work was done by Gary Johnson, I just improved it a little by
adding it to the TOC.
Best,
Christian
--
Allerhop, der
Das, was passiert, wenn man in einer vollbesetzten U-Bahn: "Verdammt,
wo ist meine Vogelspinne hin?" ruft.
-- Douglas Adams, John Lloyd, Sven Böttcher ("Der tiefere Sinn
des Labenz")
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
From f6837ada3f5e86a0af10b9226ad166f3a0da69d1 Mon Sep 17 00:00:00 2001
From: Christian Brabandt <[email protected]>
Date: Fri, 21 Oct 2016 11:25:24 +0200
Subject: [PATCH] document sequence of autocommands
closes #1180
This is just an addition to the documentation on how sequences of
autocommands are executed. Currently only documented for :tabnew
If needed, we can add more sequences for other autocommands as well.
Done By Gary Johnson, I have just cleaned it up a bit and added links
from the TOC.
---
runtime/doc/autocmd.txt | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index b901f21..e313875 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -19,6 +19,7 @@ For a basic explanation, see section |40.3| in the user manual.
9. Executing autocommands |autocmd-execute|
10. Using autocommands |autocmd-use|
11. Disabling autocommands |autocmd-disable|
+12. Sequences of autocommands |autocmd-sequences|
{Vi does not have any of these commands}
{only when the |+autocmd| feature has not been disabled at compile time}
@@ -1482,5 +1483,22 @@ following command. Example: >
This will write the file without triggering the autocommands defined by the
gzip plugin.
+==============================================================================
+12. Sequences of autocommand events *autocmd-sequences*
+
+Most Vim commands initiate a sequence of events, some of which cause
+autocommand events (|autocmd-events|) to be generated as they occur. Which
+autocommand events are generated in response to Vim events and the sequence in
+which they occur can be confusing, yet understanding them can be critical to
+getting expected results from using them. Here are some Vim events and the
+resulting sequence of autocommand events: >
+
+ :tabnew myfile
+<
+ 1. WinEnter % is name of buffer in which :tabnew was executed.
+ 2. TabNew
+ 3. TabEnter
+ 4. BufEnter % is name of the new buffer, "myfile".
+ 5. BufWinEnter
vim:tw=78:ts=8:ft=help:norl:
--
2.9.3