On 10/07/10 04:40, autodidakto wrote:
Turn line numbers on and off (:set number, :set nonumber) and observe
that wrapped lines are on the same number. Line wrapping (:set
wrap, :set nowrap) are for your convenience, but to vim, it's on all
one line. This is confusing when you want to go "down one line". j and
k will go up and down one line number, gj and gk will go up and down
one line visually, whether or not it's a number.
If pressing gj all the time is annoying and you wish j would just do
it, add this to your .vimrc
map j gj
map k gk
On Jul 8, 3:27 am, Izaak Khaliq<[email protected]> wrote:
I learned to use hjkl to move the cursor. But when I tried moving up and
down (j and k respectively) I have to press g first. Why is that?
I use
map <Up> gj
map <Down> gk
so j and k move "by file lines", <Up> and <Down> "by screen lines". The
opposite is also possible, it's a matter of personal preference.
Best regards,
Tony.
--
Williams and Holland's Law:
If enough data is collected, anything may be proven by
statistical methods.
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php