在 irb 中导航命令行的键盘快捷键

发布于 2024-12-11 04:13:25 字数 84 浏览 0 评论 0原文

我看过用户运行 irb 的截屏视频,当他们编写文本时,他们会跳转到行的开头/结尾以及单词的开头/结尾。用于执行此操作的击键是什么?这取决于所使用的外壳吗?

I've seen screencasts where users are running irb and as they write text they jump to the beginning/end of the line and beginning/end of words. What are the keystrokes used to do this? Does it depend on the shell that's being used?

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

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

发布评论

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

评论(2

避讳 2024-12-18 04:13:25
Ctrl + A => Move to beginning of line
Ctrl + E => Move to end of line 

这些是 readline 命令

这是一个 cheatsheet 您一般而言可能会有所帮助

Ctrl + A => Move to beginning of line
Ctrl + E => Move to end of line 

These are readline commands

Here is a cheatsheet you may find helpful in general

深陷 2024-12-18 04:13:25

这些是 readline 快捷方式。我经常使用的一些快捷方式:

Ctrl + a => End of line
Ctrl + e => Start of line
Ctrl + l => Clear screen
Ctrl + k => Cut text from cursor position till end of line
Ctrl + u => Cut text from cursor position till start of line
Ctrl + y => Paste text that was cut using above two shortcuts
Ctrl + d => Delete a letter after cursor
Ctrl + h => Delete a letter before cursor
Meta + d => Delete the word after cursor
Meta + f => Move cursor one word forward
Meta + b => Move cursor one word backwards.

Those are readline shortcuts. Some of the shortcuts I regularly use:

Ctrl + a => End of line
Ctrl + e => Start of line
Ctrl + l => Clear screen
Ctrl + k => Cut text from cursor position till end of line
Ctrl + u => Cut text from cursor position till start of line
Ctrl + y => Paste text that was cut using above two shortcuts
Ctrl + d => Delete a letter after cursor
Ctrl + h => Delete a letter before cursor
Meta + d => Delete the word after cursor
Meta + f => Move cursor one word forward
Meta + b => Move cursor one word backwards.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文