Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私の Vim セットアップでは、特定のマッピングでシェル コマンドを実行する構成を追加したいと考えています。Vimscriptでこれを行う方法はありますか?
vim機能がありsystem()ます:
vim
system()
:call system('date')
これは従来の vi で行っているため、vim でも機能すると思います。
私の .exrc には次のものがあります。
map ^_ !}fmt 71 72^M
(これはctrl-V ctrl-_と入力して入力され、^_ctrl -V ctrl-M と入力して入力されます^M
^_
^M
vi でctrl-_を押すと、現在の行が 72 文字に再フォーマットされます。