让 Aquamacs 的滚动方式更像 Emacs

发布于 2024-11-11 15:59:19 字数 547 浏览 7 评论 0原文

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

冷情 2024-11-18 15:59:19

为了子孙后代,我找到了一种让它发挥作用的方法。

将其粘贴到 .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)
末骤雨初歇 2024-11-18 15:59:19

点击C-SPC Cv Cl,最后一个重新居中的屏幕,似乎表明它确实保留了该标记。

随后的复制和猛拉工作正常,

也许这种行为添加到了较新的 Aquamacs 上。

hitting C-SPC C-v C-l, the last to recenter screen, seems to show that it does indeed preserve the mark.

and subsequent copy and yank works fine

perhaps this behavior added on newer Aquamacs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文