5 ms·
netrw comes by default. No need to install NERDTree.
by johncoltrane 14y ago
netrw comes by default. No need to install NERDTree.
- edanm 14y agoAnd yet, almost everyone does.
- johncoltrane 14y agoThanks to the hundreds of blog posts that tell them to do so.
- fournm 14y agoPretty much--I actually had no idea netrw existed since everyone always just points to NERDTree.
- benmills 14y agoI've recently uninstalled NERDTree in favor of netrw and I've been presently surprised at how little I miss NERDTree and how much more productive I am on default vim installations.
- slurgfest 14y agoWas NERDTree making you unproductive? How?
- williamdix 14y agoIt's not that NERDTree makes one unproductive. It's that using NetRW on default vim installations allows you to get going without installing NERDTree.
- danneu 14y agoI used NERDTree when I was starting Vim, but uninstalling and hating it were essential steps towards Vim nirvana. Because then I found out about ctrlp.vim and :E, two things that makes NERDTree completely useless to me.
- manaskarekar 14y agoI was just typing out an email to the author of netrw regarding a problem I was experiencing. Maybe someone here could help me out. Environment: - Lubuntu 12.10 64, - LXterminal as well as UXTerm, - GVim/Vim 7.3.547, - both passive and active ftp, - a local ftp server and http://secureftp-test.com/ http://secureftp-test.com/ to test it. When I try to access a remote ftp directory, I can only open the directory that I typed in a path to. As soon as I navigate through the listed directories and hit enter on any, the screen splits into two horizontal panes and the top pane reads "File not found". I tried this from Windows 7 Gvim/Vim (don't have the version handy but it was 7.3+) and it worked as expected. From what I gather it just doesn't seem to look for the right directory after I hit enter in the list I think. Maybe it skips an extra forward slash somewhere or something? I understand we're not really on the netrw/vim mailing list but any response would be appreciated!
- brown9-2 14y agoKnowledge of the ability to use netrw as a local directory browser seems to not be very widespread.
- johncoltrane 14y agoThanks to bloggers everywhere.
- statico 14y agoGood suggestion. In the article, I failed to point out that the advantage of NERDTree is its hierarchal folder view. When a project's directory structure become gigantic it's useful to see the directory structure as you edit.
- johncoltrane 14y agonetrw does that too: hit i to cycle through all the available listing style or add this line to your ~/.vimrc if you want the "tree" style by default: let g:netrw_liststyle = 4
- statico 14y agoOh, cool! I'll give it a try, thanks!
- deleted 14y ago[deleted]
- mtts 14y agoOne thing NERDTree does that netrw doesn't (IIRC, haven't looked very deeply into this) is open files you select in a different window than the one that contains the file listing. I happen to find that convenient, YMMV, of course.
- johncoltrane 14y agoo does that. :h netrw-browse-maps
- mtts 14y agoAlmost, but not quite. o opens a new window with the selected file, while nerdtree opens the file in the most recently used non-nerdtree window. Also, there doesn't seem to be a way to tell netrw to create a vertical split rather than a horizontal split, which is inconvenient on modern wide screen monitors.
- johncoltrane 14y agoDid you actually read :h netrw before giving up? P opens the file in the most recent non netrw window. v opens the file in a vertical split and :Vex opens netw in a vertical split.
- hudibras 14y agoVimcasts has an episode on netrw. http://vimcasts.org/episodes/the-file-explorer/ http://vimcasts.org/episodes/the-file-explorer/