当我使用emacs时,我曾经能够使用Cv或向上滚动来设置标记并突出显示整个页面。 然而,在Aquamacs中如果我设置了标记然后点击Cv它会丢失标记并停止突出显示。 我注意到在Aquamacs中Cv被映射到aquamacs-page-down,所以我尝试将以下命令添加到我的站点文件中:
(define-key osx-key-mode-map "C-v" 'scroll-up)这没有成功重新映射密钥。 然后我尝试了类似的东西:
(define-key global-map "\C-v" 'scroll-up)但仍然没有。 Aquamacs非常固执地挂在了对aquamacs-page-down的映射上。 然而,我注意到还有一个额外的功能,即aquamacs-page-down-extend-region,这正是我所说的。 然而,它的关键序列是,我不知道如何输入它。 我试过“shift-control-v”无济于事。
有没有人能够让Aquamacs在保持标记的同时滚动页面?
When I used emacs, I used to be able to set the mark and highlight full pages for yanking using C-v, or scroll-up. However, in Aquamacs if I set the mark then hit C-v it loses the mark and stops highlighting. I noticed that in Aquamacs C-v is instead mapped to aquamacs-page-down, so I tried adding the following command to my site file:
(define-key osx-key-mode-map "C-v" 'scroll-up)and this didn't successfully remap the key. I then tried something similar:
(define-key global-map "\C-v" 'scroll-up)and still nothing. Aquamacs very stubbornly hangs onto the mapping to aquamacs-page-down. I noticed, however, that there's an additional function, aquamacs-page-down-extend-region, which does exactly what I'm talking about. Its key sequence, however, is , and I have no idea how to input that. I tried "shift-control-v" to no avail.
Has anyone been able to get Aquamacs to scroll pages while maintaining the mark?
最满意答案
为了后人的缘故,我找到了让这个工作的方法。
将其粘贴到.emacs文件中:
;; Enable scrolling to maintain mark if set (defun scroll-down-maintain-mark () (interactive) (if mark-active (aquamacs-page-down-extend-region) (aquamacs-page-down))) (defun scroll-up-maintain-mark () (interactive) (if mark-active (aquamacs-page-up-extend-region) (aquamacs-page-up))) (define-key global-map "\C-v" #'scroll-down-maintain-mark) (define-key global-map "\M-v" #'scroll-up-maintain-mark)I've found a way to get this to work, for posterity's sake.
Paste this into the .emacs file:
;; Enable scrolling to maintain mark if set (defun scroll-down-maintain-mark () (interactive) (if mark-active (aquamacs-page-down-extend-region) (aquamacs-page-down))) (defun scroll-up-maintain-mark () (interactive) (if mark-active (aquamacs-page-up-extend-region) (aquamacs-page-up))) (define-key global-map "\C-v" #'scroll-down-maintain-mark) (define-key global-map "\M-v" #'scroll-up-maintain-mark)更多推荐
发布评论