On 2010-03-23, Jean Johner wrote: > On Mar 22, 9:11 pm, "Brian L. Matthews" <[email protected]> wrote: > > .... > > It seems that my point was definitely not clear. I state it again: > > Please launch gvim easy (using vimrc_example.vim as .vimrc) > gvim -y file1 > Put the cursor (|) at the end of line 10 (after the last letter, say > column 24) > Quit (by using the cross in the right-up corner of the window) > Reopen by gvim -y file1 > > Result: The cursor is not at line 10, column 24 but at line10, column > 23 (before the last letter). > > This means that easy gvim does not remember the end of line cursor > position. > I think that this will be perceived as a bug by easy gvim users. > Other insert mode text editors like gnome/gedit do remember the end of > line cursor position properly.
The problem you're encountering, as I understand it, arises because Vim's cursor does not lie between character positions--it lies on character positions. In the following line, for example, cat the cursor can be on the 'c', the 'a' or the 't'. From those three positions, you can insert text (i) on the left or append text (a) on the right. There are four locations in which you may want to put text or to position an insertion cursor. There are only three locations, however, at which you can place Vim's cursor before entering insert mode. When in insert mode in that line, the next keystroke could place a character in one of four locations. That means that Vim is in one of four possible states. If you were to leave insert mode at that point, Vim would have only three places at which to put the cursor and would be in one of three possible states. Vim has lost information. I was about to write that where the cursor _was_ is not a property of the cursor, but that's not true in other situations. For example, if I move the cursor straight up from this comma, it will move to the 'F', then to the space between the 'a' and the 'p', then to the start of the empty line, then to the period following "information", and then to the 's' in "lost". It remembered that it started in column 58. It forgets that information, though, upon the next command other than a vertical motion command. I suppose, then, that the cursor in normal mode could be made to remember whether it had been to the right or to the left of the current position when it was in insert mode. Hmm. I wonder if there is a way to save, access and make use of that additional information without messing up the way Vim operates normally. Regards, Gary -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
