- Minimum requirements
Vim9
,Huge
WIP, use at your own risk:
- there might be bugs;
- beware of dangerous file operations like move/rename/delete, only me testing it probably is not enough :).
Note that, copy/move file operations are way slower compared to "real" file managers.
More screencasts:
:Dir [path]
— open a path as a directory listing.- Use
:Dir
or regular:edit
/:e
command 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.json
or$APPDATA/vim-dir/bookmarks.json
depending 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
oru
or-
— one directory up.Enter
oro
— 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
ordd
— delete files/directories.R
orrr
— 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.
~
org~
— open home directory.g1
up tog0
— open numbered bookmark.Ctrl-A
1
up toCtrl-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.hidden
files/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 defaults
splits horizontally andS
splits vertically. Set to1
/true
to make the opposite.g:dir_sort_by
— sort by one ofname
,size
ortime
. Default isname
.g:dir_sort_desc
— if true, sortdesc
, otherwiseasc
. Default isfalse
.g:dir_show_hidden
— show/hide.hidden
files/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
perm
andname
are 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
7z
maybe?). - Background file operations (copy/move/delete).
- Mass rename ala
qmv
/vidir
(explore feasibility). - Networking ala
netrw
ormc
with shell/sftp links to machines (explore feasibility). Here probably I should rely on openssh.
- ✗ No treeview, no sidepanel.