15

わかりました、ここでこれをより明確にします..編集中のファイルとともに、垂直分割ウィンドウにディレクトリリストがあるとします..

Ctrl+w を使用して 1 つの分割から別の分割に移動し、4 つの方法で netrw プラグインを使用してファイル リスト内のファイルを開くことができます。リターン キー、v、o、t を使用します。

return キーで、現在の (netrw) 分割ウィンドウで開きます.. v で、新しい垂直分割を作成します.. (o (水平分割)、t (新しいタブ) と同じ)

しかし、私はファイルがすでにそこにある他の分割で開かれることを望んでいます..新しい分割を開く代わりに、すべての編集を行います..私の質問が明確であることを願っています..コマンドを入力して、強調表示されたファイルnetrw 分割ではなく、編集分割で開きます..これには簡単な解決策があるはずです..または、netrw を使用する最良の方法を誰か教えてください..私は適応しようとします..

4

2 に答える 2

24

答えはドキュメントにあります::h netrw。いつものように。

あなたが探しているP

To edit a file or directory in the previously used (last accessed) window (see
:he CTRL-W_p), press a "P".  If there's only one window, then the one window
will be horizontally split (above/below splitting is controlled by
g:netrw_alto, and its initial size is controlled by g:netrw_winsize).

If there's more than one window, the previous window will be re-used on
the selected file/directory.  If the previous window's associated buffer
has been modified, and there's only one window with that buffer, then
the user will be asked if s/he wishes to save the buffer first (yes,
no, or cancel).
于 2012-09-03T20:32:46.453 に答える