vi /etc/inputrc
大约在第40行,找到page up page down的用法,去掉前面的#号,重启终端即可
40 # alternate mappings for "page up" and "page down" to search the history
41 "\e[5~": history-search-backward
42 "\e[6~": history-search-forward
本文介绍如何在vi编辑器中配置inputrc文件,通过修改特定行的设置,启用使用Page Up和Page Down键来搜索历史记录的功能。只需取消注释相关行并重启终端即可生效。
vi /etc/inputrc
大约在第40行,找到page up page down的用法,去掉前面的#号,重启终端即可
40 # alternate mappings for "page up" and "page down" to search the history
41 "\e[5~": history-search-backward
42 "\e[6~": history-search-forward
6365
2万+
6158
1102

被折叠的 条评论
为什么被折叠?