|
1 | | -*autocmd.txt* For Vim version 7.0aa. Last change: 2004 Aug 30 |
| 1 | +*autocmd.txt* For Vim version 7.0aa. Last change: 2004 Sep 17 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -234,22 +234,26 @@ BufWriteCmd Before writing the whole buffer to a file. |
234 | 234 | should not be changed. |Cmd-event| |
235 | 235 | *FileWritePre* |
236 | 236 | FileWritePre Before writing to a file, when not writing the |
237 | | - whole buffer. |
| 237 | + whole buffer. Use the '[ and '] marks for the |
| 238 | + range of lines. |
238 | 239 | *FileWritePost* |
239 | 240 | FileWritePost After writing to a file, when not writing the |
240 | 241 | whole buffer. |
241 | 242 | *FileWriteCmd* |
242 | 243 | FileWriteCmd Before writing to a file, when not writing the |
243 | 244 | whole buffer. Should do the writing to the |
244 | | - file. Should not change the buffer. |
| 245 | + file. Should not change the buffer. Use the |
| 246 | + '[ and '] marks for the range of lines. |
245 | 247 | |Cmd-event| |
246 | 248 | *FileAppendPre* |
247 | | -FileAppendPre Before appending to a file. |
| 249 | +FileAppendPre Before appending to a file. Use the '[ and '] |
| 250 | + marks for the range of lines. |
248 | 251 | *FileAppendPost* |
249 | 252 | FileAppendPost After appending to a file. |
250 | 253 | *FileAppendCmd* |
251 | 254 | FileAppendCmd Before appending to a file. Should do the |
252 | | - appending to the file. |Cmd-event| |
| 255 | + appending to the file. Use the '[ and '] |
| 256 | + marks for the range of lines.|Cmd-event| |
253 | 257 | *FilterWritePre* |
254 | 258 | FilterWritePre Before writing a file for a filter command or |
255 | 259 | making a diff. |
@@ -738,8 +742,9 @@ The '[ and '] marks have a special position: |
738 | 742 | the new lines will be inserted. |
739 | 743 | - Before the *ReadPost event the '[ mark is set to the first line that was |
740 | 744 | just read, the '] mark to the last line. |
741 | | -- Before executing the *WritePre and *AppendPre autocommands the '[ mark is |
742 | | - set to the first line that will be written, the '] mark to the last line. |
| 745 | +- Before executing the *WriteCmd, *WritePre and *AppendPre autocommands the '[ |
| 746 | + mark is set to the first line that will be written, the '] mark to the last |
| 747 | + line. |
743 | 748 | Careful: '[ and '] change when using commands that change the buffer. |
744 | 749 |
|
745 | 750 | In commands which expect a file name, you can use "<afile>" for the file name |
|
0 commit comments