summaryrefslogtreecommitdiff
path: root/runtime/doc/autocmd.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-09-15 23:02:04 +0200
committerBram Moolenaar <Bram@vim.org>2019-09-15 23:02:04 +0200
commit8aeec40207b5adcd3a155277dc4f29189343b963 (patch)
tree4c62d41b6474eaddb0d2ad4c088bb6931b39b9ce /runtime/doc/autocmd.txt
parentea8dcf8346f488786023fd03ec1c013cda243040 (diff)
downloadvim-git-8aeec40207b5adcd3a155277dc4f29189343b963.tar.gz
patch 8.1.2044: no easy way to process postponed workv8.1.2044
Problem: No easy way to process postponed work. (Paul Jolly) Solution: Add the SafeState autocommand event.
Diffstat (limited to 'runtime/doc/autocmd.txt')
-rw-r--r--runtime/doc/autocmd.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index aa2836283..d336ba9fa 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -355,6 +355,9 @@ Name triggered by ~
when popup menu visible
|TextYankPost| after text has been yanked or deleted
+|SafeState| nothing pending, going to wait for the user to type a
+ character
+
|ColorSchemePre| before loading a color scheme
|ColorScheme| after loading a color scheme
@@ -955,6 +958,27 @@ RemoteReply When a reply from a Vim that functions as
Note that even if an autocommand is defined,
the reply should be read with |remote_read()|
to consume it.
+ *SafeState*
+SafeState When nothing is pending, going to wait for the
+ user to type a character.
+ This will not be triggered when:
+ - an operator is pending
+ - a register was entered with "r
+ - halfway executing a command
+ - executing a mapping
+ - there is typeahead
+ - Insert mode completion is active
+ - Command line completion is active
+ You can use `mode()` to find out what state
+ Vim is in. That may be:
+ - VIsual mode
+ - Normal mode
+ - Insert mode
+ - Command-line mode
+ Depending on what you want to do, you may also
+ check more with `state()`, e.g. whether the
+ screen was scrolled for messages.
+
*SessionLoadPost*
SessionLoadPost After loading the session file created using
the |:mksession| command.