更改 emacs 中 R 会话中的 home 键行为
我想更改从 emacs 运行的 R 会话中 home 键的行为。当我按下 home 键时,它会一直显示 >
提示符。我希望使用主页键将我带到命令条目的开头(即从行开头开始的两个点)。我假设我可以通过我的 .emacs
文件进行此调整;对于我需要添加到该文件中的命令的任何指导,我们将不胜感激。谢谢!
I would like to change the behavior of the home key within an R session run from emacs. When I press the home key, it takes me all the way to the >
prompt. I'd like the home key to take me to the start of the command entry (i.e., two points in from the start of the line). I assume that I can make this adjustments via my .emacs
file; any guidance for the commands that I would need to add to that file would be appreciated. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您想要的行为已作为
Ca
提供。您可以使用以下行重新绑定 home 键:当您使用 R 会话时,有多种方法可以自动实现此操作。我使用如下内容:
这对于单个键绑定来说有点多,但您可以扩展 my-inferior-ess-mode-hook 的定义以包含您需要的许多自定义项喜欢用。
The behaviour you want is already available as
C-a
. You can rebind the home key with the following line:There are a number of ways to get this to happen automatically when you are using the R session. I use something like the following:
That's a bit much for a single key-binding, but you can extend the definition of
my-inferior-ess-mode-hook
to include a number of customizations you'd like to use.