私はgrep -e Peugeot -e PeuGeot carlist.txtcarlist.txtを検索していくつかのアイテムを引き出すgrep -e Peugeot -e PeuGeot carlist.txt | viために使用していますが、それが私のためにそれをパイプするだろうと推測しましたが、これは私が得るものです:
Vim: Warning: Input is not from a terminal
Vim: Error reading input, exiting...
Vim: preserving files...
Vim: Finished.
grep ... > /tmp/foo。&& vi /tmp/fooそのファイルをすぐに編集する場合は、最後に追加できます。
vi任意のテキストファイルで動作します。ファイル自体はに直接関連付けられていませんvi。(または、私は学んだように、vi -原因となりますviの内容を操作するためにstdin、vimこれを行いますが、のではないすべてのバージョンvi。DO)
:read !grep -e Peugeot -e PeuGeot carlist.txtます。:read !cmd...cmd ...の出力をファイルに(カーソルの位置で)含める