LoginSignup
7
4

More than 5 years have passed since last update.

vimから外部コマンドを実行、および、実行結果を挿入する

Last updated at Posted at 2016-05-03

コマンドラインモード

シェルでコマンドを実行

シェルでプログラムを実行

  • !をつけることで外部プログラムを実行できる 例):!ls
  • 現在編集中ファイルの省略記号である%を使うことで、編集中のプログラム実行も簡単にできる
    例):!ruby %

  • :shellで対話型シェルセッションが実行可能。exitコマンドでシェルを終了してvimに復帰する

  • :read !{cmd}でコマンド実行結果の標準出力を、カーソル行の下に挿入できる

7
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
4