[英]Ctrl-P doesn't work on vi mode of command line editing on mac terminal
https://www.gnu.org/software/bash/manual/html_node/Readline-vi-Mode.html said we could do set -o vi
to use vi mode instead of emacs mode for command line editing. https://www.gnu.org/software/bash/manual/html_node/Readline-vi-Mode.html说我们可以
set -o vi
使用 vi 模式而不是 emacs 模式进行命令行编辑。
And the help: ex-edit-index
sais和
help: ex-edit-index
sais
c_CTRL-P CTRL-P after using 'wildchar' with multiple matches:
go to previous match, otherwise: recall older
command-line from history.
However when I press CTRL-P
I just got ^P
但是,当我按
CTRL-P
我得到了^P
May I know why ?我可以知道为什么吗?
Readline's "vi mode" is neither vi nor Vim. Readline 的“vi 模式”既不是 vi 也不是 Vim。 It is a partial emulation of vi shoehorned into the command line context.
它是硬塞到命令行上下文中的 vi 的部分模拟。
That <Cp>
you are referring to is a Vim command so there is no reason whatsoever to expect it to do anything in that context.您所指的
<Cp>
是一个Vim命令,因此没有任何理由期望它在该上下文中执行任何操作。 Vim's documentation is totally irrelevant in this case.在这种情况下,Vim 的文档完全无关紧要。
Search for Vim Mode bindings
in $ man readline
for the actual bindings at your disposal in that "mode".在
$ man readline
搜索Vim Mode bindings
, $ man readline
获取该“模式”中可供您使用的实际绑定。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.