Mercurial > vim
comparison runtime/doc/insert.txt @ 29450:67f31c24291b
Update runtime files
Commit: https://github.com/vim/vim/commit/b529cfbd04c02e31cfa88f2c8d88b5ff532d4f7d
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jul 25 15:42:07 2022 +0100
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 25 Jul 2022 16:45:06 +0200 |
parents | f8116058ca76 |
children | f68f43043842 |
comparison
equal
deleted
inserted
replaced
29449:25b27a637e86 | 29450:67f31c24291b |
---|---|
386 <ScrollWheelRight> move window six columns right *i_<ScrollWheelRight>* | 386 <ScrollWheelRight> move window six columns right *i_<ScrollWheelRight>* |
387 <S-ScrollWheelRight> move window one page right *i_<S-ScrollWheelRight>* | 387 <S-ScrollWheelRight> move window one page right *i_<S-ScrollWheelRight>* |
388 CTRL-O execute one command, return to Insert mode *i_CTRL-O* | 388 CTRL-O execute one command, return to Insert mode *i_CTRL-O* |
389 CTRL-\ CTRL-O like CTRL-O but don't move the cursor *i_CTRL-\_CTRL-O* | 389 CTRL-\ CTRL-O like CTRL-O but don't move the cursor *i_CTRL-\_CTRL-O* |
390 CTRL-L when 'insertmode' is set: go to Normal mode *i_CTRL-L* | 390 CTRL-L when 'insertmode' is set: go to Normal mode *i_CTRL-L* |
391 CTRL-G u break undo sequence, start new change *i_CTRL-G_u* | 391 CTRL-G u close undo sequence, start new change *i_CTRL-G_u* |
392 CTRL-G U don't break undo with next left/right cursor *i_CTRL-G_U* | 392 CTRL-G U don't start a new undo block with the next *i_CTRL-G_U* |
393 movement, if the cursor stays within the | 393 left/right cursor movement, if the cursor |
394 same line | 394 stays within the same line |
395 ----------------------------------------------------------------------- | 395 ----------------------------------------------------------------------- |
396 | 396 |
397 Note: If the cursor keys take you out of Insert mode, check the 'noesckeys' | 397 Note: If the cursor keys take you out of Insert mode, check the 'noesckeys' |
398 option. | 398 option. |
399 | 399 |
426 undo the effect of the backspace key, without changing what you typed before | 426 undo the effect of the backspace key, without changing what you typed before |
427 that, with CTRL-O u. Another example: > | 427 that, with CTRL-O u. Another example: > |
428 | 428 |
429 :inoremap <CR> <C-]><C-G>u<CR> | 429 :inoremap <CR> <C-]><C-G>u<CR> |
430 | 430 |
431 This breaks undo at each line break. It also expands abbreviations before | 431 This starts a new undo block at each line break. It also expands |
432 this. | 432 abbreviations before this. |
433 | 433 |
434 An example for using CTRL-G U: > | 434 An example for using CTRL-G U: > |
435 | 435 |
436 inoremap <Left> <C-G>U<Left> | 436 inoremap <Left> <C-G>U<Left> |
437 inoremap <Right> <C-G>U<Right> | 437 inoremap <Right> <C-G>U<Right> |
441 \ repeat('<C-G>U<Right>', match(getline('.'), '\S') + 0) : | 441 \ repeat('<C-G>U<Right>', match(getline('.'), '\S') + 0) : |
442 \ repeat('<C-G>U<Left>', col('.') - 1 - match(getline('.'), '\S'))) | 442 \ repeat('<C-G>U<Left>', col('.') - 1 - match(getline('.'), '\S'))) |
443 inoremap <expr> <End> repeat('<C-G>U<Right>', col('$') - col('.')) | 443 inoremap <expr> <End> repeat('<C-G>U<Right>', col('$') - col('.')) |
444 inoremap ( ()<C-G>U<Left> | 444 inoremap ( ()<C-G>U<Left> |
445 | 445 |
446 This makes it possible to use the cursor keys in Insert mode, without breaking | 446 This makes it possible to use the cursor keys in Insert mode, without starting |
447 the undo sequence and therefore using |.| (redo) will work as expected. | 447 a new undo block and therefore using |.| (redo) will work as expected. Also |
448 Also entering a text like (with the "(" mapping from above): | 448 entering a text like (with the "(" mapping from above): |
449 | 449 |
450 Lorem ipsum (dolor | 450 Lorem ipsum (dolor |
451 | 451 |
452 will be repeatable by using |.| to the expected | 452 will be repeatable by using |.| to the expected |
453 | 453 |