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.
私は次のシナリオを持っています.2つの開いているファイルは
vim -O2 file1.txt file2.txt
私のカーソルはfile1.txtにあります。file2.txt のいくつかの行 (80 行目から 100 行目など) を選択したいのですが、カーソルを file2.txt に移動してそこにテキストをヤンクする必要はありません。可能であれば、vim のコマンド ラインを使用します。何か提案はありますか?
ありがとう。
私が考えることができる最も近いものは次のとおりです。
:bn|80,100y|bp|pu
これはうまくいくはずです:
:call setline(80, getbufline(bufnr('file2.txt'), 80, 100))