Tue Vo
Tue Vo

Reputation: 323

NERDTree (Vim): How to open a file with path in NERDTree quickly

I'm newbie in vim (NERDTree). My question: How to open a file with a path by command (like: vim /etc/hosts) And open this file in new tab

Thanks for help.

Upvotes: 4

Views: 11173

Answers (2)

qiubix
qiubix

Reputation: 1332

You can just type in:

:tabnew /path/to/file

If you want to use NERDTree, you can open NERDTree (type :NERDTree), navigate to your file, and then press t with cursor on the file name. This will open specific file in new tab.

Also, while in NERDTree, you can hit ?. That will show you it's internal help with list of available commands. Hit ? again to exit help and enjoy :)

See also :help NERDTree, if you want more complete documentation.

Upvotes: 11

Tony Hopkinson
Tony Hopkinson

Reputation: 20320

:tabnew some/path/to/some/file

Upvotes: 3

Related Questions