Neovim for Beginners — File Explorer

Configure file explorer for Neovim, with and without plugins.

alpha2phi
4 min readJan 8, 2022
Neovim for Beginners — File Explorer

Exploring files and directories is what we do daily. Let’s check out how Neovim can help us. We are going to

  • Explore Netrw (:h netrw) which is the built-in file browser supporting local and remote file browsing.
  • Configure sensible defaults for Netrw and check out vinegar.vim that enhances Netrw.
  • Install and configure nvim-tree, a Lua-based plugin for Neovim.

This article is part of the Neovim for Beginners series.

The Neovim configuration files can be found in this repository.

Netrw

All Vimmers should have some basic knowledge of Netrw.

Netrw makes reading files, writing files, browsing over a network, and
local browsing easy. It supports many protocols like scp, ftp, http, rsync, sftp, fetch, dav, etc (:h netrw-ref).

We can use it to read a remote file.

nvim scp://hostname/path/to/file
nvim ftp://hostname/path/to/file

We can use it to browse a remote directory.

nvim scp://hostname/
nvim ftp://hostname/path/to/dir/

--

--