2

Anyone else have any trouble with j and k in viper-mode when visual-line-mode is enabled? It skips many lines... is there any harm in re-binding them to next-line and previous-line, which recognizes visual "line breaks" in Emacs > version 23?

hatmatrix
  • 42,883
  • 45
  • 137
  • 231

2 Answers2

1

I rarely ever use this.

If you ever need to go up/down visual-line-wise, you can always use g j, g k (in Vimpulse, since you've tagged this question with Vimpulse), which is, at any rate, faster than C-n / C-p.

spk
  • 584
  • 5
  • 6
  • C-n / C-p will always be faster than g j, g k. Try it: hold the Ctrl key, and then hit n or p repeatedly. Now try the same with g j and g k; not only do you need more keypresses but you have to worry about sequencing them properly – huyz May 26 '11 at 00:41
  • You're right, Huy. I meant easier on the fingers... My fingers hurt with C-n / C-p. :-) Btw, the default behaviour is really helpful in modes like org-mode, or even general programming language modes, where you can zip down quickly. – spk May 28 '11 at 11:24
1

I also want the same thing.

So in .emacs, I remapped:

(vimpulse-map "k" 'previous-line)
(vimpulse-map "j" 'next-line)
(vimpulse-map "gk" 'viper-previous-line)
(vimpulse-map "gj" 'viper-next-line)
(vimpulse-map [(up)] 'viper-previous-line)
(vimpulse-map [(down)] 'viper-next-line)
(vimpulse-map "0" 'vimpulse-beginning-of-visual-line)
(vimpulse-map "$" 'vimpulse-end-of-visual-line)
(vimpulse-map "g0" 'viper-beginning-of-line)
(vimpulse-map "g$" 'viper-goto-eol)

In my .vimrc, I remapped:

noremap k gk
noremap j gj
noremap gk k
noremap gj j
noremap 0 g0
noremap ^ g^
noremap $ g$
noremap g0 0
noremap g^ ^
noremap g$ $
huyz
  • 2,297
  • 3
  • 25
  • 34