I'm recording a macro attempting to re-create nerdtree by:

  1. From within the original open buffer, create and switch to a new window using :vsplit
  2. Use :Explore to open vim's file explorer, and select a file to open
  3. ...
  4. The new split is closed, and the selected file is open in the original open buffer.

What would the third step be here? Is there a way to change the buffer of another window using :Explore?

  • 1
    This is a link I often share on NerdTree related questions: Oil and vinegar. Using NerdTree is generally not a good idea for your workflow and trying to recreate a project drawer with netrw might be even worst because that will ask a lot of work for a messy result. Instead I would advise to get familiar with :h :Vexplore and its sister commands, :h :find and maybe plugins like ctrlp or fzf. – statox Dec 5 at 10:01
  • Tim Pope wrote vim-vinegar after reading the above-linked article, which slightly enhances the native netrw workflow. – Jim Stewart Dec 7 at 16:05

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.