zsh vimモードでコマンドを実行する

zsh vimモードでコマンドを実行する

私は何かをzsh書いたvim mode

foo foo bar bar

Escその後、通常モードをクリックし、次のように入力しました。:

foo foo bar bar
execute: _

barそれからこれを行うことができると思ったので、検索して変更したかったです。baz

foo foo bar bar
execute: s/bar/baz/g_

それからEnterキーを押してみましたが、うまくいきませんでした。 +をexecute使用した後にのみCtrl戻ることができますc

コマンドをどのように実行できますか?

私はこれを一般的な方法で試しましたが、.zshrc何も得られませんでした.zshrc

ベストアンサー1

vicmd模様名前にもかかわらず、これはViの通常モードコマンドです。起動プロンプト:はViのex-modeコマンドではありませんが、次のように実行されます。ZLE(Zshの行エディタ)コマンド:

$ echo foo
execute: e_
edit-command-line          emacs-forward-word         end-of-history             end-of-line-hist           exchange-point-and-mark    execute-named-cmd          expand-history             expand-or-complete-prefix
emacs-backward-word        end-of-buffer-or-history   end-of-line                end-of-list                execute-last-named-cmd     expand-cmd-path            expand-or-complete         expand-word

Enter一意のプレフィックスを入力するとPressが機能します(つまり、入力して一致すると仮定するededit-command-line機能Enterします)。Tabを押すと、一致するコマンドが表示されます。

おすすめ記事