A fuzzy finder only helps if you remember the file name. In this episode we build a visual file explorer with neo-tree.nvim including create/rename/delete/move operations, then introduce oil.nvim's radical approach of editing directories like editing plain text files.

After building ultra-fast navigation with telescope.nvim in episode 11, a question often pops into new Neovim users' minds: "If I can search files in a split second, why would I still need a file explorer?" The answer: because a fuzzy finder only helps if you already know the file name.
Imagine you have just joined someone else's codebase. You open the repo, then what? Telescope's find_files demands you type something. But to understand a project's structure — "what files are in the services/ directory, which modules depend on each other, which file did I just create?" — you need to see a visual directory map. In the real world, this is exactly the difference between looking up a contact name in your phone (fuzzy finder) versus browsing folders in an archive shelf (file explorer): the two complement each other, not replace each other.
In episode 12 we will cover two approaches: neo-tree.nvim as a modern visual file explorer, and oil.nvim, which offers a radical paradigm — editing a directory like editing a plain text file. Let's begin.
A rarely known fact: Neovim actually already has a built-in file explorer called netrw (called via :Explore, :e ., or :Ex). Unfortunately, netrw feels ancient — its navigation is confusing, there are no file icons, and its keymap collisions often interfere with other plugins.
Most modern users replace it with neo-tree.nvim or nvim-tree.lua. And most importantly: netrw must be disabled so it does not conflict with our explorer of choice. You do this with one block of vim.g in the config:
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1Caution
The two lines above (loaded_netrw and loaded_netrwPlugin) must be present before the explorer plugin loads. Without them, when you press the explorer shortcut, netrw sometimes appears instead — or you get a keymap conflict that is hard to trace. This is one of the most classic traps when setting up a file explorer.
neo-tree.nvim is a file explorer that separates sources into three panels: filesystem, buffers, and git_status. This differs from most other explorers, which merge everything into one view. It also has a libuv-based file watcher — file changes outside the editor are reflected in the tree immediately, without manual refresh.
return {
{
"nvim-neo-tree/neo-tree.nvim",
cmd = "Neotree",
keys = {
{ "<leader>e", "<cmd>Neotree toggle<CR>", desc = "Toggle file explorer" },
{ "<leader>E", "<cmd>Neotree focus<CR>", desc = "Fokus ke file explorer" },
},
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"nvim-tree/nvim-web-devicons",
},
opts = {
close_if_last_window = true,
filesystem = {
follow_current_file = { enabled = true },
use_libuv_file_watcher = true,
},
},
},
}Two key settings to understand:
follow_current_file = true — every time you switch to another file, neo-tree automatically highlights that file in the tree. This keeps "where am I now?" always answered. Very useful in large projects.use_libuv_file_watcher = true — uses the system's built-in file watcher. If your colleague changes a file in another editor, the change is immediately visible in your tree.Important navigation keymaps in neo-tree:
| Shortcut | Function |
|---|---|
h / l | Close / open a directory (collapse/expand) |
o | Open a file (in the same window) |
v / x | Open a file in a vertical / horizontal split |
R | Refresh the tree |
q | Close the file explorer |
? | Show all available mappings |
Tip
Neo-tree uses h and l as directory toggles, not Enter like typical explorers. This is intentional: consistent with the Vim motions you learned in episode 2. h closes a directory (back to the parent), l opens it.
The main selling point of a file explorer over a fuzzy finder is visual file operations: creating, renaming, deleting, and moving files without leaving the editor. Neo-tree provides all of them through default mappings on the highlighted file:
| Mapping | Operation | Explanation |
|---|---|---|
a | Add (create) | Creates a new file or directory. A name ending with / means a directory |
r | Rename | Renames a file/directory |
d | Delete | Deletes (with confirmation) |
m | Move | Moves to another directory (with path autocomplete) |
y / p | Copy / Paste | Copy to the neo-tree clipboard then paste elsewhere |
x | Cut | Cut for moving |
A real workflow example: you want to create lua/plugins/dap.lua for episode 22 later. Open neo-tree (<leader>e), navigate to the lua/plugins/ folder with j/k and l, press a, type dap.lua, press Enter. The file immediately appears in the tree, ready to be edited.
Important
To create a directory, end the name with / — for example type configs/ when pressing a. Neo-tree distinguishes files and directories by this last character. Forgetting the slash often results in a file (not a folder) being created by accident.
All of the above operations can also be done via the command line without the explorer, if you prefer:
:Neotree reveal " buka explorer dan sorot file aktif
:Neotree toggle filesystem " toggle panel filesystem sajaOne important note about file operations: all of them are direct file system changes — there is no undo inside the explorer. Neo-tree gives confirmation for risky operations (d for delete), but getting used to the keymaps before using them on important files is a good habit.
As mentioned at the start, neo-tree has three separate sources. Mastering the other two will make you rarely return to telescope just to view git status:
| Source | Command | Use |
|---|---|---|
filesystem | :Neotree filesystem | The main directory explorer |
buffers | :Neotree buffers | List of open buffers, with modification icons |
git_status | :Neotree git_status | All changed files in the git working tree |
To switch between sources, just press H / L inside the neo-tree window (following the "left/right" logic consistent with Vim motions). The git_status source is very useful for sorting your work: untracked, modified, and deleted files are grouped visually, and pressing o on a file opens its diff directly.
Before neo-tree, file exploration in Neovim was synonymous with nvim-tree.lua — a lighter plugin, focused on one source (filesystem only), and not depending on nui.nvim. Many distros (NvChad, for example) still use it as their default because it is simple:
return {
"nvim-tree/nvim-tree.lua",
dependencies = { "nvim-tree/nvim-web-devicons" },
keys = {
{ "<leader>e", "<cmd>NvimTreeToggle<CR>", desc = "Toggle file explorer" },
},
opts = {
view = { width = 34 },
update_cwd = true,
},
}How to choose between the two? The considerations:
Tip
There is no obligation to choose just one. Many power users install neo-tree as the main explorer and oil for bulk operations, without nvim-tree at all. The key is not installing two explorers with the same keymap — they will fight over <leader>e and cause conflicts.
Let's tie it all together in one real work scenario. You receive a task to add a new GET /health endpoint to a Go service you have never opened before:
<leader>e — neo-tree shows the structure. Explore the internal/api/ folder to understand the existing handler patterns.handler.go. Press v to open it in a vertical split, then l to expand the surrounding folder structure.H to switch to the git_status source — all changes are visible.<leader>fg — telescope's live_grep takes over.filesystem (press L), highlight the internal/api/ folder, press a, type handler_test.go.Notice the flow: explorer for browsing and understanding, git status for watching changes, fuzzy finder for finding something specific. Three tools, one goal, without a single mouse click.
Now let's discuss a truly different approach. oil.nvim (Oil = "Open In Lover" — a play on the edit directory like a file concept) does not draw a tree. It shows a directory's contents as a plain text buffer — a file with one line per entry. You edit it like editing text: change names, delete lines, add lines, then save with :w and the changes are applied to the real file system.
return {
{
"stevearc/oil.nvim",
keys = {
{ "-", "<cmd>Oil<CR>", desc = "Buka oil (direktori parent)" },
{ "<leader>-", "<cmd>Oil<CR>", desc = "Buka oil dari file aktif" },
},
opts = {
default_file_explorer = true,
columns = { "icon" },
delete_to_trash = false,
view_options = {
show_hidden = true,
},
},
},
}Here is an example of how an oil buffer looks:
.. ../ " naik satu level
.github/ .github/
.vscode/ .vscode/
config/ config/
content/ content/
package.json package.json
README.md README.md
src/ src/
tsconfig.json tsconfig.jsonHow oil works:
- — the buffer contains a list of directory entries.README.md to README-old.md, or delete its line — like editing plain text.:w — oil applies all the changes at once to the file system.- again to go up to the parent directory.Oil also has built-in preview: hover the cursor over a file and oil shows its contents in a preview window — helping you decide "is this the file I'm looking for?" without opening it.
Note
An interesting philosophical difference: neo-tree is visual mode (you navigate with movements and keymaps), while oil is textual mode (you type changes then save them). Some people are faster with visuals, others are faster with typing — which is why many install both at once.
One oil option worth considering is delete_to_trash — sending "deleted" files to the system trash instead of permanently deleting them. This is a cheap safety net for mistakes that cannot be undone:
opts = {
default_file_explorer = true,
columns = { "icon" },
# [!code --:1]
delete_to_trash = false,
# [!code ++:1]
delete_to_trash = true,
view_options = {
show_hidden = true,
},
},Caution
Note that delete_to_trash = true only works if your system provides a trash concept — for example macOS and Linux desktops with gio trash. On a headless server or WSL without a desktop environment, this option can fail silently, so deletion remains permanent. Test it once in your environment before relying on this option.
Now that you have telescope, neo-tree, and oil, you have three tools for one goal: opening files. The key to efficiency is knowing when to use each:
| Criterion | Fuzzy Finder (telescope) | File Explorer (neo-tree) | Oil |
|---|---|---|---|
| Already know the file name | Best — just type | Slow | Slow |
| Want to see the folder structure | Not helpful | Best | Good enough |
| Want file operations (create/rename/move) | Cannot | Best | Best (bulk edit) |
| Exploring an unfamiliar codebase | Not helpful | Best | Good enough |
| Many same-named files in different folders | Best (use path) | Good enough | Good enough |
| Mass refactor / rename many files | Cannot | Slow (one by one) | Best (edit many lines) |
Tip
The power users' rule of thumb: telescope for opening files you know, neo-tree for seeing context around the active file, and oil for mass file manipulation. Choose based on context, not habit.
| Mistake | Symptom | Solution |
|---|---|---|
| Netrw not disabled | The explorer appears as the ancient netrw view | Set vim.g.loaded_netrw and loaded_netrwPlugin at the start of the config |
| Folds active in neo-tree | Directories look "closed" without clear markers | Use h/l to collapse/expand; check folds in default_component_configs |
show_hidden = false (oil default) | Dot files not visible in oil | Set view_options.show_hidden = true |
Forgot :w in oil | Name/delete changes not applied | Always :w to apply, or :wq to apply and exit |
| Relying on the explorer to find files | Slow in large projects | Combine with telescope's find_files |
| Explorer shortcut unresponsive | No reaction when pressing <leader>e | Check the plugin is loaded (manual :Neotree), then make sure the keymap is correct |
In episode 12 we added two complementary navigation weapons: neo-tree.nvim as a visual file explorer with complete file operations (create, rename, delete, move, copy-paste) and real-time file watching, plus oil.nvim, which edits directories like editing plain text with :w as the apply button. You now also know when to use the explorer, when the fuzzy finder, and when oil — based on the work context, not habit.
Up to this point, you can open any file in a project at lightning speed. But what about returning to the same file repeatedly within one work session? Or rebuilding your entire window layout after a laptop restart? In episode 13, we will cover ultra-fast jump navigation with flash.nvim, favorite file markers with harpoon, plus session management and the undo tree — the next level of editing productivity. Stay motivated!