Update README and keymaps for netrw navigation

Add command variants for netrw and update keymaps to improve
navigation experience. Store initial working directory as
project root for better symlink handling.
This commit is contained in:
Ray Elliott 2026-01-12 15:18:10 +00:00
commit d876425956
3 changed files with 29 additions and 8 deletions

View file

@ -52,12 +52,24 @@ Core keymaps available globally (not plugin-specific). These provide fallbacks f
### `lua/netrw-config.lua`
#### `:Ex` Command Variants
| Command | Opens netrw at |
| --- | --- |
| `:Ex` | Current working directory (`:pwd`) |
| `:Ex .` | Current file's directory |
| `:Ex %:h` | Current file's directory (explicit) |
| `:Ex /path/to/dir` | Specific path |
#### Custom Keymaps
| Mode | Key | Description |
| --- | --- | --- |
| n | `<leader>te` | Open netrw in a new tab rooted at current file directory |
| n | `<leader>tE` | Open netrw in a new tab rooted at project cwd |
| n | `<leader>nt` | Open netrw in new tab at current file's directory |
| n | `<leader>nT` | Open netrw in new tab at project root |
| n | `<leader>nr` | Open netrw in current window at project root |
**Note:** Project root is stored as the initial working directory when Neovim starts. This allows navigation back to the project root even after following symlinks to external directories.
#### Default Netrw Keymaps