On 12/02/09 16:24, Ben Fritz wrote:
>
>
> On Feb 12, 2:26 am, soundphed<[email protected]> 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?
>
> I personally avoid moving around in insert mode as much as possible.
> If I need to move any more than a single word away, or move to a
> different line, I ALWAYS leave insert mode first. To me, "insert mode"
> is less of a mode of operation than it is an incomplete command. I
> view "itypesometext<esc>" as a single command, not entering a mode,
> typing text, then leaving the mode. This actually agrees with the way
> Vim treats it, in a way...if you use 'u' to undo after an insert, it
> will remove all text inserted since you pressed the 'i' key in the
> first place. Basically the entire insertion is treated as a single
> operation.
Well, I feel quite comfortable using <Left> <Right> (moving by single
characters), <C-Left> <C-Right> (by words), <Home> <End> (to either end
of the current line), <Up> <Down> (by lines), <PageUp> <PageDown> (by
pages i.e. screenfulls) when in Insert mode -- and each of these
commands stops undo, it's only when you enter characters one after
another without cursor moves that they constitute a single "undo block".
In fact, the following
:inoremap <Space> <Space><Left><Right>
:inoremap <Tab> <Tab><Left><Right>
:inoremap <CR> <CR><Up><Down>
create an undo point after each WORD.
Best regards,
Tony.
--
It is illegal for a driver to be blindfolded while operating a vehicle.
[real standing law in Alabama, United States of America]
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---