| Minimum requirements: | Vim9, Huge version |
|---|
More screencasts:
:Dir [path]— open a path as a directory listing.- Use
:Diror regular:edit/:ecommand to refresh directory listing.
:DirFilter[!] {regex}— Show files/directories matching{regex}. With!hide files/directories matching{regex}:# Show files/dirs with e in the name :DirFilter e # Hide files/dirs with e in the name :DirFilter! e # Hide files/dirs with e.*p in the name :DirFilter! e.*p
:DirFilterClear— clear filter.:DirBookmark— save bookmark for a current directory. Bookmarks are saved in~/.config/vim-dir/bookmarks.jsonor$APPDATA/vim-dir/bookmarks.jsondepending on OS.:DirBookmarkJump— jump to bookmarked directory.:DirHistoryJump— jump to directory from history.
There are no global mappings.
You can set at least one yourself to quickly call Dir:
nnoremap <bs> <cmd>Dir<cr>
With that mapping you would be able to trigger a Dir with Backspace
showing current buffer file name in a directory list. Consequent
Backspace presses would open parent directories.
Other global mappings might be, for example:
nnoremap <space>gd <cmd>Dir ~/Documents<cr> nnoremap <space>gD <cmd>Dir ~/Downloads<cr>
- Backspace or u or - — one directory up.
- Enter or o — open a file or a directory under cursor.
- O — open a file/directory with OS.
- s — open a file/directory in a split.
- S — open a file/directory in a vertical split.
- t — open a file/directory in a tab.
- Ctrl-R — refresh directory.
- ]] — jump over directories forward, place cursor on a first file/last directory.
- [[ — jump over directories backward, place cursor on the last/first directory.
- gj — open quick jump menu.
- i — preview a file (first 100 lines) or show dir info (nothing on windows).
- x — toggle selection of file/directory.
- X — toggle selection of all files/directories (select/unselect all).
- D or dd — delete files/directories.
- R or rr — rename files/directories.
- p — copy selected files/directories into current directory.
- P — move selected files/directories into current directory.
- A — open actions menu.
- C — create directory.
- cc — create file.
- ~ or g~ — open home directory.
- g1 up to g0 — open numbered bookmark.
- Ctrl-A 1 up to Ctrl-A 0 — set numbered bookmark for a current directory.
- gb — open bookmarks jump menu.
- gh — open history jump menu. History is saved for each directory where file was opened for editing.
- g , — sort current buffer dir by size.
- g . — sort current buffer dir by time.
- g / — sort current buffer dir by name.
- . — toggle
.hiddenfiles/directories. - > — widen the dir view (adding some columns).
- < — shrink the dir view (removing some columns).
g:dir_open_os— if a file/directory is matched against file extension in a list, open it using OS.g:dir_invert_split— by default s splits horizontally and S splits vertically. Set to1/trueto make the opposite.g:dir_sort_by— sort by one ofname,sizeortime. Default isname.g:dir_sort_desc— if true, sortdesc, otherwiseasc. Default isfalse.g:dir_show_hidden— show/hide.hiddenfiles/directories. Default istrue.g:dir_history_size— maximum numbers of directories in history. Default is 100.g:dir_columns— columns for the dir view. Default is- Windows:
perm,size,time,name - Linux/Other:
perm,user,group,size,time,name
Columns
permandnameare mandatory and should be in order.- Windows:
g:dir_change_cwd— change current working directory on file opening. Default is0.
- Support archives: view contents/create/add/extract (using
7zmaybe?). - Background file operations (copy/move/delete).
- ✗ No treeview, no sidepanel.
- ✗ Mass rename ala
qmv/vidir(explore feasibility). - ✗ Networking ala
netrwormc.