[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: A Vi (Vim) question



On 09 May 2005, Ritesh Raj Sarraf wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Deboo Geek wrote:
> 
> > On 5/8/05, Ritesh Raj Sarraf <riteshsarraf@users.sourceforge.net> wrote:
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >> 
> >> Deboo Geek wrote:
> >> 
> >> > A small Vi question: How to move ahead/forward a line when in insert
> >> > mode. I always have to use the arrow keys to move forward, when in
> >> > insert mode. Is there any way to move ahead without shifting my right
> >> > hand from the alphabets to the arrow keys?
> >> >
> >> >
> >> > Deboo
> >> 
> >> You can't do that in insert mode.
> >> Hit Escape, return to Normal mode and then use your H,J,K,L keys to move.
> > 
> > I wish there was a way or some shortcut instead of extending the left
> > hand and hitting Escape. Thanks anyway.
> > 
> > Deboo
> > 
> 
> Then I'd suggest you not to use vi.
> The power of vi lies in "modes" which you aren't trying to explore or
> haven't yet explored.
> 
> Try it! Once you understand it you'll get addicted :-)
> 

Why not make (i)mappings for insert mode to do what you want, using Alt
plus the other keys? E.g.

imap <A-h> <Left>
imap <A-j> <Down>
imap <A-k> <Up>
imap <A-l> <Right>

Anthony

-- 
ac@acampbell.org.uk    ||  http://www.acampbell.org.uk for
using Linux GNU/Debian ||  blog, book reviews, electronic  
Windows-free zone      ||  books and skeptical articles



Reply to: