emacs可不可以像vim那样c-e/c-y一行一行的滚动~?


c-v/m-v一滚就滚全屏幕.

Linux emacs vim

youne 10 years, 2 months ago

我的.emacs中这样设置了下,ALT + P/N 可以方便的上下滚动

(defun hold-line-scroll-up()
"Scroll the page with the cursor in the same line"
(interactive)
(let ((next-screen-context-lines
(count-lines
(window-start) (window-end))))
(scroll-up)))
(global-set-key (kbd "M-N") 'hold-line-scroll-up)
;;
(defun hold-line-scroll-down()
"Scroll the page with the cursor in the same line"
(interactive)
(let ((next-screen-context-lines
(count-lines
(window-start) (window-end))))
(scroll-down)))
(global-set-key (kbd "M-P") 'hold-line-scroll-down)

南斗来一发 answered 10 years, 2 months ago

Your Answer