H
H
HasBenBlahBlag2014-02-10 01:42:31
vim
HasBenBlahBlag, 2014-02-10 01:42:31

How to create a file in the directory I chose with NERDTree in VIM?

I select a directory in NERDTree while the console is divided into two parts. I select a directory (I press t twice), then I try to create a file in another part of the console, but the file is not created in the directory that I chose, but in a completely different place. Tell me what I'm doing wrong.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
niosus, 2014-02-10
@HasBenBlahBlag

When you have the NERDTree in focus and the directory you want is selected, press on the keyboard cd, this will set the folder you selected as the active directory. After that, you can safely create a file :e test.cppand it will be created in this directory.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question