在 emacs 中,M-f将插入符号移动到下一个单词的末尾。在 zsh 中,M-f(或者更确切地说alt-f)将插入符号移动到下一个单词的开头。
为了获得更一致的体验,我想要 zshalt-f镜像 emacs 行为。
我怎样才能做到这一点?
bindkey '\ef' emacs-forward-word
Run Code Online (Sandbox Code Playgroud)
看:
zle -la | grep word
Run Code Online (Sandbox Code Playgroud)
列出包含单词 的小部件word。
info --index-search=emacs-forward-word zsh
Run Code Online (Sandbox Code Playgroud)
获取有关给定小部件的文档。