On 12/02/09 09:26, soundphed wrote:
> Hi there, I am wondering if it might be neat to be able to move around
> in insert mode via the h,j,k,l keys, as in normal mode.
> Say like with a modifier key, so you could hold down<ctrl> and hjkl
> would then move the cursor while keeping you in insert mode.
>
> Does something of this nature already exist in vim?
> If not, how does one move the cursor left,right,up,down while in
> insert mode?
Well, of course h j k l in Insert modes insert the letters h j k l into
your text, and I ton't think you would want to type only text containing
none of these four letters.
With Ctrl, Ctrl-J is linefeed (which Vim handles as Enter IIUC) and
Ctrl-H is Backspace so I think that's excluded too. (And the presence or
absence of the Shift modifier is immaterial for the meaning of Ctrl +
letter).
Alt-h to Alt-l are synonyms to è é ê ë respectively. I don't know about
you, but I wouldn't want to remap these letters, all of which are used
with various frequencies in my native language (French). Alt-H to Alt-L
(or Alt-shift-h to Alt-shift-l) are the uppercase counterparts of these
accented letters. You might try Ctrl-Alt-h to Ctrl-Alt-l if your gvim
sees them. (In Latin1 or UTF-8 the equivalent characters, 0x88 to 0x8B,
are rarely-used control characters, but if your preferred encoding is
Windows-1252 they might collide with something you might want to use, I
don't know).
The standard way of moving the cursor in Insert mode, even if it makes
you puke, is by using the cursor-movement keys. You could also use the
Ctrl-O prefix, see |i_CTRL-O|, but it isn't very practical for such
constantly-used keys. Another possibility would be to move your hand
straight up and use F5 to F8 (after remapping them to <Left> <Down> <Up>
and <Right> respectively).
And in case you didn't know, the latter is achieved by
:map! <F5> <Left>
:map! <F6> <Down>
:map! <F7> <Up>
:map! <F8> <Right>
Best regards,
Tony.
--
BRIDGEKEEPER: What is the air-speed velocity of an unladen swallow?
ARTHUR: What do you mean? An African or European swallow?
BRIDGEKEEPER: Er ... I don't know that ... Aaaaarrrrrrggghhh!
BRIDGEKEEPER is cast into the gorge.
"Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---