gpt4 book ai didi

用于 "free"光标定位的 Emacs 模式

转载 作者:行者123 更新时间:2023-12-04 16:32:03 25 4
gpt4 key购买 nike

是否有一种模式可以让我通过单击鼠标或通过按键将光标放置在屏幕上的任何位置(包括行尾之后)?

编辑:

基于图片模式的次要模式,它完全符合问题的要求。

(define-minor-mode free-point-mode
"Place the cursor anywhere on the screen, irrespective of linebreaks, by clicking or using the arrow keys"
nil nil
`((,(kbd "<mouse-1>") . picture-mouse-set-point)
(,[remap right-char] . picture-forward-column)
(,[remap left-char] . picture-backward-column)
(,[remap previous-line] . picture-move-up)
(,[remap next-line] . picture-move-down))
(require 'picture))

(defadvice picture-mouse-set-point (after no-region activate)
(deactivate-mark))

最佳答案

picture-mode 让您将光标定位在屏幕上的任何位置。不要让名字欺骗了你,这与图像无关:

To edit a picture made out of text characters (for example, a picture of the division of a register into fields, as a comment in a program), use the command M-x picture-mode to enter Picture mode.

关于用于 "free"光标定位的 Emacs 模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13036465/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com