Answers
我的.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