Reputation: 323
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
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