Emacs:以非截断模式导航

发布于 2024-08-14 05:38:20 字数 184 浏览 2 评论 0原文

我正在 Emacs 中编辑一个包含很长行的文件。我已经打开了行截断,并且我想快速查看每行中的最后一个单词。

所以我移动到第一行的末尾,然后当我按 Cn 时,它会将我带到下一行,并且水平位置不会丢失。但是当我执行 Cv 时,它会将我带到下一页第一行的开头,即水平位置丢失。

有解决方法吗?

感谢您的任何帮助。

I'm editing a file with very long lines in Emacs. I've turned on line truncating, and I want to quickly see the last words in each line quickly.

So I move to the end of the first line, then when I press C-n it takes me to the next line and the horizontal position is not lost. But when I do C-v, it takes me to the beginning of first line in the next page i.e., the horizontal position is getting lost.

Is there a workaround for this?

Thanks for any help.

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

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

发布评论

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

评论(1

樱花细雨 2024-08-21 05:38:20

您可以根据 Cn 实现 Cv,如下所示:

(defun scroll-up-keep-position ()
  (interactive)
  (next-line (window-height)))
(global-set-key [(control v)] 'scroll-up-keep-position)

You could implement C-v in terms of C-n, something like this:

(defun scroll-up-keep-position ()
  (interactive)
  (next-line (window-height)))
(global-set-key [(control v)] 'scroll-up-keep-position)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文