Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

netrw comes by default. No need to install NERDTree.


I 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/ 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!


I'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.


I 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.


Was NERDTree making you unproductive? How?


It's not that NERDTree makes one unproductive. It's that using NetRW on default vim installations allows you to get going without installing NERDTree.


Knowledge of the ability to use netrw as a local directory browser seems to not be very widespread.


Thanks to bloggers everywhere.


One 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.


o does that. :h netrw-browse-maps


Almost, 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.


Did 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.


Good 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.


netrw 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


Oh, cool! I'll give it a try, thanks!


Vimcasts has an episode on netrw. http://vimcasts.org/episodes/the-file-explorer/


And yet, almost everyone does.


Thanks to the hundreds of blog posts that tell them to do so.


Pretty much--I actually had no idea netrw existed since everyone always just points to NERDTree.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: