Bash 设置 vi mode
bash shell在行模式编辑内容时,模式为emacs的操作模式
查看 readline 的 man 手册内容如下
| $ man readline |
| |
| ... |
| |
| editing-mode (emacs) |
| Controls whether readline begins with a set of key bindings similar to Emacs or vi. |
| editing-mode can be set to either emacs or vi. |
| |
| keymap (emacs) |
| Set the current readline keymap. |
| The set of legal keymap names is emacs, emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move, vi-command, and vi-insert. |
| vi is equivalent to vi-command; emacs is equivalent to emacs-standard. |
| The default value is emacs. The value of editing-mode also affects the default keymap. |
| |
| |
| |
| $include /etc/inputrc |
| |
| set editing-mode vi |
| set keymap vi |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步