comparison runtime/doc/autocmd.txt @ 3342:bb67cd961fc3 v7.3.438

updated for version 7.3.438 Problem: There is no way to avoid ":doautoall" reading modelines. Solution: Add the <nomodeline> argument. Adjust documentation.
author Bram Moolenaar <bram@vim.org>
date Sun, 12 Feb 2012 00:18:58 +0100
parents af1e8a1714c2
children 198ec1fff71a
comparison
equal deleted inserted replaced
3341:4d2f7f850f63 3342:bb67cd961fc3
1071 the autocommands for all groups. When the [group] 1071 the autocommands for all groups. When the [group]
1072 argument is included, Vim executes only the matching 1072 argument is included, Vim executes only the matching
1073 autocommands for that group. Note: if you use an 1073 autocommands for that group. Note: if you use an
1074 undefined group name, Vim gives you an error message. 1074 undefined group name, Vim gives you an error message.
1075 1075
1076 After applying the autocommands the modelines are
1077 processed, so that their settings overrule the
1078 settings from autocommands, like what happens when
1079 editing a file.
1080
1081 *:doautoa* *:doautoall* 1076 *:doautoa* *:doautoall*
1082 :doautoa[ll] [group] {event} [fname] 1077 :doautoa[ll] [<nomodeline>] [group] {event} [fname]
1083 Like ":doautocmd", but apply the autocommands to each 1078 Like ":doautocmd", but apply the autocommands to each
1084 loaded buffer. Note that [fname] is used to select 1079 loaded buffer. Note that [fname] is used to select
1085 the autocommands, not the buffers to which they are 1080 the autocommands, not the buffers to which they are
1086 applied. 1081 applied.
1087 Careful: Don't use this for autocommands that delete a 1082 Careful: Don't use this for autocommands that delete a
1088 buffer, change to another buffer or change the 1083 buffer, change to another buffer or change the
1089 contents of a buffer; the result is unpredictable. 1084 contents of a buffer; the result is unpredictable.
1090 This command is intended for autocommands that set 1085 This command is intended for autocommands that set
1091 options, change highlighting, and things like that. 1086 options, change highlighting, and things like that.
1087
1088 After applying the autocommands the modelines are
1089 processed, so that their settings overrule the
1090 settings from autocommands, like what happens when
1091 editing a file. This is skipped when the <nomodeline>
1092 argument is present.
1092 1093
1093 ============================================================================== 1094 ==============================================================================
1094 10. Using autocommands *autocmd-use* 1095 10. Using autocommands *autocmd-use*
1095 1096
1096 For WRITING FILES there are four possible sets of events. Vim uses only one 1097 For WRITING FILES there are four possible sets of events. Vim uses only one