Code Files
A simple file manager WebView for VS Code.
Features
- Keyboard-centric Navigation: Navigate files and directories quickly using custom keybindings.
- Zip Support: View and interact with zip archives as if they were directories.
- Incremental Search: Quickly filter files with Migemo support.
- Favorites: Manage and access frequently used directories.
- External Commands: Run custom shell commands on selected files.
Usage
Open the Code Files view from the Activity Bar or use the command palette (Ctrl+Shift+P / Cmd+Shift+P) to run Code Files: Open File Manager in Tab.
Configuration
The extension can be configured via settings.json:
code-files.defaultPath: The default path to open. Supports ~ for home directory and ${workspaceFolder} for the current workspace root. (Default: ~)
code-files.migemoDictionaryPath: Path to the Migemo dictionary file. Supports ~ and ${workspaceFolder}. Leave empty to disable Migemo search.
code-files.keyBindings: Configure custom keybindings. These override the default keybindings.
code-files.externalCommands: Configure external commands. These are restricted settings and will be ignored in untrusted workspaces.
code-files.favoritePaths: List of favorite directory paths to quickly access. Supports ~ and ${workspaceFolder}.
Keybindings
Default keybindings:
| Key |
Action |
Description |
a |
selectAll |
Select all files in the current view. |
c |
copy |
Copy selected files. |
d |
delete |
Delete selected files. |
i |
incrementalSearch |
Start incremental search. |
k |
createDirectory |
Create a new directory. |
m |
move |
Move selected files. |
n |
createFile |
Create a new file. |
o |
openInNewTab |
Open selected file in a new editor tab. |
O |
openInSplitTab |
Open selected file in a split editor tab. |
p |
compress |
Compress selected files into a zip archive. |
r |
refresh |
Refresh the file list. |
R |
revealCurrentDirectory |
Reveal the current directory in the OS file explorer. |
s |
sort |
Sort files by name, date, size, etc. |
u |
extractArchive |
Extract selected archive. |
? |
showKeyBindings |
Show the current keybindings. |
: |
specialLocation |
Navigate to a special location (favorites, root, home). |
; |
focusAddressBar |
Focus the address bar to edit the path or navigate. |
F2 |
rename |
Rename selected file. |
Custom Keybindings
You can override default keybindings in settings.json. For example, to bind x to delete:
"code-files.keyBindings": [
{
"key": "x",
"action": "delete"
}
]
External Commands
Run external commands on selected files using code-files.externalCommands.
Example: Echo the selected file path to the terminal.
"code-files.externalCommands": [
{
"key": "e",
"command": "echo ${selection}",
"runInTerminal": true
}
]
Variables:
${selection}: The path of the currently selected file.
${selections}: Space-separated paths of all selected files.
| |