Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

ViM: NetRW Plugin and Tree Style Listing

📅 2010-Nov-30 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ netrw, plugins, vim ⬩ 📚 Archive

 

NetRW is an awesome plugin written by Charles Campbell that ships along with ViM. It is meant to be a file explorer for reading and writing network files, but works great for local files and directories too. ViM fans tend to recommend the NERD Tree plugin a lot, but I found that netrw satisfies all the file-explorer-like functionality I need. All the information you need to get started with netrw can be found in the VimCast here.

Tree Style Listing

netrw displays files in a flat hierarchy by default (left window in above screenshot). But, I like to have a tree view (right window in above screenshot). To setup netrw to show tree view by default, add this line to your vimrc:

let g:netrw_liststyle=3

For more info on this setting type :help g:netrw_liststyle in ViM.


© 2023 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 Mastodon📧 Email