add netrw live previews and directory summaries

This commit is contained in:
Ray Elliott 2026-10-28 16:29:18 +00:00
commit f31a9b7d74
6 changed files with 625 additions and 40 deletions

View file

@ -98,10 +98,24 @@ Core keymaps available globally (not plugin-specific). These provide fallbacks f
| Key | Description |
| --- | --- |
| `p` | Preview file in horizontal split (50% window size) |
| `p` | Preview the selected file or directory below and enable live cursor updates |
| `j` / `k` | Update an existing preview to the newly selected entry |
| `:pclose` / `<C-w>z` | Close the preview and stop live updates |
| `P` | Open file in previous window |
| `o` | Open file in horizontal split below |
| `v` | Open file in vertical split |
| `t` | Open file in a new tab |
Regular files use netrw's native preview. Directories show a read-only summary of
their immediate children, including type, file size, modification time, and a
total for immediate files. Directories appear first, output is capped at 200
entries, and symbolic links are displayed without following them recursively.
Opening a file with `<CR>`, `o`, `v`, or `t`, or otherwise leaving netrw, closes
the preview. Closing it manually also disables live updates until `p` is pressed
again. Enhanced directory summaries apply to local paths (including local paths
when Neovim runs over SSH); netrw URI browsing retains its native preview
behavior.
##### File Operations