diff runtime/doc/autocmd.txt @ 23165:a916fca16d4b v8.2.2128

patch 8.2.2128: there is no way to do something on CTRL-Z Commit: https://github.com/vim/vim/commit/100118c73ac068137cd298d22953896242752523 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 11 19:30:34 2020 +0100 patch 8.2.2128: there is no way to do something on CTRL-Z Problem: There is no way to do something on CTRL-Z. Solution: Add VimSuspend and VimResume autocommand events. (closes https://github.com/vim/vim/issues/7450)
author Bram Moolenaar <Bram@vim.org>
date Fri, 11 Dec 2020 19:45:04 +0100
parents 99ef85ff1af4
children fab58304f77d
line wrap: on
line diff
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -306,6 +306,9 @@ Name			triggered by ~
 |VimLeavePre|		before exiting Vim, before writing the viminfo file
 |VimLeave|		before exiting Vim, after writing the viminfo file
 
+|VimSuspend|		when suspending Vim
+|VimResume|		when Vim is resumed after being suspended
+
 	Terminal
 |TerminalOpen|		after a terminal buffer was created
 |TerminalWinOpen|	after a terminal buffer was created in a new window
@@ -1231,6 +1234,17 @@ VimLeavePre			Before exiting Vim, just b
 VimResized			After the Vim window was resized, thus 'lines'
 				and/or 'columns' changed.  Not when starting
 				up though.
+							*VimResume*
+VimResume			When the Vim instance is resumed after being
+				suspended and |VimSuspend| was triggered.
+				Useful for triggering |:checktime| and ensure
+				the buffers content did not change while Vim
+				was suspended: >
+	:autocmd VimResume * checktime
+<							*VimSuspend*
+VimSuspend			When the Vim instance is suspended.  Only when
+				CTRL-Z was typed inside Vim, not when the
+				SIGSTOP or SIGTSTP signal was sent to Vim.
 							*WinEnter*
 WinEnter			After entering another window.  Not done for
 				the first window, when Vim has just started.