使Aquamacs更像Emacs滚动(Making Aquamacs scrolling more like Emacs)

编程入门 行业动态 更新时间:2024-10-26 16:22:51
使Aquamacs更像Emacs滚动(Making Aquamacs scrolling more like Emacs)

当我使用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)

更多推荐

本文发布于:2023-07-24 01:58:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1240169.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:更像   Aquamacs   Emacs   scrolling   Making

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!