vsnetrw

August 12, 2022 ยท View on GitHub

A split file explorer for vscode, inspired by netrw, vim-vinegar, dired, and vim-dirvish.

vsnetrw in action

Shortcuts

Use vsnetrw.open to open a file explorer at the parent directory of the currently active text editor. Once open the following shortcuts are available.

Default ShortcutCommandDescription
entervsnetrw.openAtCursorOpen the file or directory under the cursor
-vsnetrw.openParentJump to the parent directory
~vsnetrw.openHomeJump to the root of the current workspace folder, or user's homedir.
Rvsnetrw.renameRename the file or directory under the cursor
%vsnetrw.createCreate a new file or directory (and any intermediate directories).
dvsnetrw.createDirCreate a new directory (and any intermediate ones).
Dvsnetrw.deleteDelete the file or directory under the cursor.
ctrl+lvsnetrw.refreshRefresh the directory listing.
escvsnetrw.closeClose the active explorer.

VSCodeVim Keybindings

To make - open an explorer from any file (like vim-vinegar) add the following binding to your vim.normalModeKeyBindings.

{
  "before": ["-"],
  "commands": ["vsnetrw.open"],
  "when": "editorLangId != vsnetrw"
}

This binding can't be provided as part of the extension because native VSCode's keybindings will accidentally trigger in undesirable instances (e.g. pressing r- in normal mode).

Installation

vsnetrw can be installed from the VSCode Marketplace.

You can also download a VSIX from releases and install it by running >Extensions: Install from VSIX.