On 21/04/09 15:58, Pablo Giménez wrote: > Hi vims! > I have realized that if you are in insert mode and then press <Esc> and > v to switch to visual mode the cursor is set to the character before, > not the next character. > This is really annoying because for example if you are at the beggining > of an indented line and the you switch to visual mode, the selection > begins from the tab character not from the first character in the line. > Somebody knows any way to change this behavious??? > thx
No, but if you are in Normal mode and hit a (for "append"), you'll get into insert mode with the cursor on the next character. One reason for this behaviour is that (by default, i.e., without 'virtualedit' which is a comparatively late addition to Vim) the Normal-mode cursor has to be on a character, while the Insert cursor can be just after the end of a line. Another reason could be Vi compatibility, but I'm not sure about that, since I've never used "legacy Vi" myself. However, hitting Ctrl-O in Insert mode will let you execute exactly one Normal-mode command without first moving the cursor, so Ctrl-O v should visually highlight the current character. You would then be in Visual mode, but when you leave Visual mode you'll return to Insert mode: the 'showmode' message at the very bottom says "(insert) VISUAL". Best regards, Tony. -- Physicists do it with charm --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
