开发者

viper-next-line, viper-previous-line has trouble with visual-line-mode?

开发者 https://www.devze.com 2023-01-16 06:45 出处:网络
Anyone else have any trouble with j and k in viper-mode when visual-line-mode is enabled? It skips many lines... is th开发者_开发技巧ere any harm in re-binding them to next-line and previous-line, whi

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


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.


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$ $
0

精彩评论

暂无评论...
验证码 换一张
取 消