comparison runtime/doc/autocmd.txt @ 16023:dc766e1b0c95

Update runtime files. commit https://github.com/vim/vim/commit/26967617a30e55aedc98b8f14b841d88469abd0e Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 17 17:13:16 2019 +0100 Update runtime files.
author Bram Moolenaar <Bram@vim.org>
date Sun, 17 Mar 2019 17:15:11 +0100
parents 7cfe57329284
children 81e6940504e8
comparison
equal deleted inserted replaced
16022:284797c49db1 16023:dc766e1b0c95
1 *autocmd.txt* For Vim version 8.1. Last change: 2019 Jan 19 1 *autocmd.txt* For Vim version 8.1. Last change: 2019 Mar 13
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
619 mode. Also when the text of the cursor line 619 mode. Also when the text of the cursor line
620 has been changed, e.g., with "x", "rx" or "p". 620 has been changed, e.g., with "x", "rx" or "p".
621 Not triggered when there is typeahead or when 621 Not triggered when there is typeahead or when
622 an operator is pending. 622 an operator is pending.
623 For an example see |match-parens|. 623 For an example see |match-parens|.
624 Note: This can not be skipped with
625 `:noautocmd`.
624 Careful: This is triggered very often, don't 626 Careful: This is triggered very often, don't
625 do anything that the user does not expect or 627 do anything that the user does not expect or
626 that is slow. 628 that is slow.
627 *CursorMovedI* 629 *CursorMovedI*
628 CursorMovedI After the cursor was moved in Insert mode. 630 CursorMovedI After the cursor was moved in Insert mode.
1022 |b:changedtick| has changed (also when that 1024 |b:changedtick| has changed (also when that
1023 happened before the TextChanged autocommand 1025 happened before the TextChanged autocommand
1024 was defined). 1026 was defined).
1025 Not triggered when there is typeahead or when 1027 Not triggered when there is typeahead or when
1026 an operator is pending. 1028 an operator is pending.
1029 Note: This can not be skipped with
1030 `:noautocmd`.
1027 Careful: This is triggered very often, don't 1031 Careful: This is triggered very often, don't
1028 do anything that the user does not expect or 1032 do anything that the user does not expect or
1029 that is slow. 1033 that is slow.
1030 *TextChangedI* 1034 *TextChangedI*
1031 TextChangedI After a change was made to the text in the 1035 TextChangedI After a change was made to the text in the
1463 If you want the buffer to be unmodified after changing it, reset the 1467 If you want the buffer to be unmodified after changing it, reset the
1464 'modified' option. This makes it possible to exit the buffer with ":q" 1468 'modified' option. This makes it possible to exit the buffer with ":q"
1465 instead of ":q!". 1469 instead of ":q!".
1466 1470
1467 *autocmd-nested* *E218* 1471 *autocmd-nested* *E218*
1468 By default, autocommands do not nest. If you use ":e" or ":w" in an 1472 By default, autocommands do not nest. For example, if you use ":e" or ":w" in
1469 autocommand, Vim does not execute the BufRead and BufWrite autocommands for 1473 an autocommand, Vim does not execute the BufRead and BufWrite autocommands for
1470 those commands. If you do want this, use the "nested" flag for those commands 1474 those commands. If you do want this, use the "nested" flag for those commands
1471 in which you want nesting. For example: > 1475 in which you want nesting. For example: >
1472 :autocmd FileChangedShell *.c nested e! 1476 :autocmd FileChangedShell *.c nested e!
1473 The nesting is limited to 10 levels to get out of recursive loops. 1477 The nesting is limited to 10 levels to get out of recursive loops.
1474 1478
1610 :noautocmd w fname.gz 1614 :noautocmd w fname.gz
1611 1615
1612 This will write the file without triggering the autocommands defined by the 1616 This will write the file without triggering the autocommands defined by the
1613 gzip plugin. 1617 gzip plugin.
1614 1618
1619 Note that some autocommands are not triggered right away, but only later.
1620 This specifically applies to |CursorMoved| and |TextChanged|.
1621
1615 1622
1616 vim:tw=78:ts=8:noet:ft=help:norl: 1623 vim:tw=78:ts=8:noet:ft=help:norl: