Answer the question
In order to leave comments, you need to log in
vim. Is it possible to open a file under the cursor in an adjacent window?
Vim is divided into 2 windows. The left one has the current directory open (:e .) and the cursor is hovering over the name of a file in that directory. If you press ENTER, this file will open in the same (left) window. How to make it open in the right window, and the list of files would remain in the left one?
Answer the question
In order to leave comments, you need to log in
How to make it open in the right window, and the list of files would remain in the left one?
let g:netrw_preview = 1
and click on the file of interest p
instead of ENTER
. In this case, the preview window for the file under the cursor will open to the right of the list of files, and the cursor will remain in the left window. The next click p
will replace the content of the preview with the file under the cursor. p
, there is v
. And besides, F1
in the list of files opens help on the topic.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question