4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Can't break an Insert into several undoable parts.
12 Solution: Add the CTRL-G u command.
13 Files: runtime/doc/insert.txt, src/edit.c
16 *** ../vim-6.2.147/runtime/doc/insert.txt Mon Jun 2 21:31:14 2003
17 --- runtime/doc/insert.txt Thu Oct 30 15:31:54 2003
20 ! *insert.txt* For Vim version 6.2. Last change: 2003 Jun 02
23 VIM REFERENCE MANUAL by Bram Moolenaar
25 ! *insert.txt* For Vim version 6.2. Last change: 2003 Oct 30
28 VIM REFERENCE MANUAL by Bram Moolenaar
31 <MouseUp> scroll three lines up *i_<MouseUp>*
32 <S-MouseUp> scroll a full page up *i_<S-MouseUp>*
33 CTRL-O execute one command, return to Insert mode *i_CTRL-O*
34 -----------------------------------------------------------------------
36 Note: If the cursor keys take you out of Insert mode, check the 'noesckeys'
39 ! The CTRL-O command sometimes has one side effect: If the cursor was beyond the
40 end of the line, it will be put on the last character in the line.
41 The shifted cursor keys are not available on all terminals.
43 When the 'whichwrap' option is set appropriately, the <Left> and <Right>
44 keys on the first/last character in the line make the cursor wrap to the
46 <MouseUp> scroll three lines up *i_<MouseUp>*
47 <S-MouseUp> scroll a full page up *i_<S-MouseUp>*
48 CTRL-O execute one command, return to Insert mode *i_CTRL-O*
49 + CTRL-G u break undo sequence, start new change *i_CTRL-G_u*
50 -----------------------------------------------------------------------
52 Note: If the cursor keys take you out of Insert mode, check the 'noesckeys'
55 ! The CTRL-O command sometimes has a side effect: If the cursor was beyond the
56 end of the line, it will be put on the last character in the line.
57 The shifted cursor keys are not available on all terminals.
59 + Another side effect is that a count specified before the "i" or "a" command is
60 + ignored. That is because repeating the effect of the command after CTRL-O is
63 + An example for using CTRL-G u: >
65 + :inoremap <C-H> <C-G>u<C-H>
67 + This redefines the backspace key to start a new undo sequence. You can now
68 + undo the effect of the backspace key, without changing what you typed before
69 + that, with CTRL-O u.
71 When the 'whichwrap' option is set appropriately, the <Left> and <Right>
72 keys on the first/last character in the line make the cursor wrap to the
73 *** ../vim-6.2.147/src/edit.c Sun Oct 26 19:57:02 2003
74 --- src/edit.c Thu Oct 30 15:17:50 2003
80 case 'j': ins_down(TRUE);
83 + /* CTRL-G u: start new undoable edit */
85 + ins_need_undo = TRUE;
88 /* Unknown CTRL-G command, reserved for future expansion. */
89 *** ../vim-6.2.147/src/version.c Sun Nov 9 20:23:26 2003
90 --- src/version.c Sun Nov 9 20:25:52 2003
94 { /* Add new patch number below this line */
100 Team-building exercises come in many forms but they all trace their roots back
101 to the prison system. In your typical team-building exercise the employees
102 are subjected to a variety of unpleasant situations until they become either a
103 cohesive team or a ring of car jackers.
104 (Scott Adams - The Dilbert principle)
106 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
107 /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
108 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
109 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///