[prev in list] [next in list] [prev in thread] [next in thread]
List: vim
Subject: Re: moving down winlines instead of lines
From: Jos van den Oever <oever () FenK ! wau ! nl>
Date: 2002-04-18 14:00:32
[Download RAW message or body]
On Thursday 18 April 2002 15:48, Tomas Zellerin wrote:
> On Thu, Apr 18, 2002 at 03:47:36PM +0200, Jos van den Oever wrote:
> > When editing Latex files, I like to have one paragraph on one line. With
> > the option linebreak this gives nice wrapping. This has the disadvantage
> > that <Up> (or k) and <Down> (or j) move the cursor one entire paragraph.
> > Is is possible to remap j and k or <Up> and <Down> to move one winline
> > instead of one line.
> >
> > I've been playing a bit, by defining a function and trying to map that to
> > a key, but even a simple test like
> >
> > function MoveDown()
> > return "\j"
> > endfunction
> >
> > nmap j <c-r>=MoveDown()<cr>
> >
> > does not work.
> >
> > Best regards, Jos
>
> Just to be sure, you know about gj and gk?
>
> :help gj
noo, i didn't.
Now the following lines are in my .vimrc
nmap <Up> gj
imap <Up> <Esc>gkli
nmap <Down> gk
imap <Down> <Esc>gjli
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic