emacs 中的多行句子

发布于 2024-08-06 14:58:09 字数 226 浏览 1 评论 0原文

如果我在 Emacs 中有一个多行句子,它自然会溢出到以下几行。现在,如果我的光标位于这样一个句子的开头,并且按下 DOWN ARROW 键,则光标将放置在下一个句子的开头(可能位于下 4-5 行) ,而不是在下一行本身(其他编辑器这样做)。 ENDHOME 键的行为相同。

有没有办法可以改变这种行为并使光标位于下一行而不是下一个句子?

If I have a multiline sentence in Emacs it naturally overflows onto the the following lines. Now, if my cursor is at the beginning of such a sentence and I press the DOWN ARROW key, the cursor is placed at the beginning of the next sentence (which might be at 4-5 lines down), rather than on the next line itself (which other editors do). Same is the behavior of the END and HOME keys.

Is there a way in which I can change this behavior and get the cursor on the next line instead of the next sentence?

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

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

发布评论

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

评论(3

御弟哥哥 2024-08-13 14:58:09

我自己还没有尝试过,但我认为您要求的是 emacs 23 的默认行为。您运行的是哪个版本?

您可能需要查看 emacswiki 上的按可见线移动页面。

I haven't yet tried it myself, but I think what you are asking for is the default behavior for emacs 23. What version are you running?

You might want to check out the page Move By Visible Lines page on the emacswiki.

哑剧 2024-08-13 14:58:09

您可能想尝试自动填充模式longlines-mode。要获取其中之一,请使用 MX,然后键入所需的命令。以同样的方式关闭它们。

如果这不起作用,您可能需要检查应用于向下箭头的绑定。输入 Ch k 然后按向下箭头键。

You might want to try auto-fill-mode or longlines-mode. To get either use M-X then type the command you want. Toggle them off the same way.

If that doesn't work you may want to examine the binding that is being applied to your down arrow. Type C-h k then hit the down arrow key.

ˉ厌 2024-08-13 14:58:09

听起来好像文本正在换行,因此根据定义(一行是由回车符分隔的一组字符),它正在向下移动到下一行。

我同意这是一种痛苦,但是很多其他编辑也有这种行为。

一种方法是关闭换行:

Mxtoggle-truncate-lines

您将无法在编辑器中看到所有文本,但它会向下移动到下一行。

It sounds as though the text is wrapping, so by definition (a line being a group of characters separated by a carriage return), it is moving down to the next line.

I agree it is a pain, however a lot of other editors also have this behaviour.

One way is to turn off wrapping:

M-x toggle-truncate-lines

You wont be able to see all of the text in the editor, however it will move down to the next line.

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