Hi,
Tim Chase schrieb am 27.08.2015 um 14:46:
> Based on my reading of
>
> :help i_CTRL-\_CTRL-O
>
> it should act like i_CTRL-O without moving the cursor. However, I
> tried the following sequence and didn't see the behavior:
>
> $ vim -u NONE some_prose.txt
> " move to some arbitrary middle-of-the-document location
> ihello<c-\><c-o>gUb
>
> At this point, it takes a full second (not the instantaneous update
> that would happen in normal mode; not the main problem, just odd;
> happens to coincide with 'timeoutlen') before the text changes
> visually to upper-case unless I hit another key. However the cursor
> gets positioned at the *beginning* of "hello" rather than after
> "hello" where it was before the command was issued.
this is to be expected. The last sentence in the second paragraph below
:help i_CTRL-\_CTRL-O
documents that cursor position is *not* restored after the command
following i_CTRL-\_CTRL-O.
> So i_CTRL-\_CTRL-O appears to be the same behavior as i_CTRL-O
> instead of preserving the cursor-location.
The difference is visible immediately after
ihello<c-o>
and
ihello<c-\><c-o>
In the first case the cursor is moved back to the 'o', while in the
second case it stays after the 'o'. More examples:
ohello<c-o>:echo col('.')<cr>
will print '5', while
ohello<c-\><c-o>:echo col('.')<cr>
will print '6' although the line only has 5 letters.
Regards,
Jürgen
--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)
--
--
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
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment