Find file and open directory in special directory with zoxide.
The project is public at sourcehut, and source can be get from here. Issues, patches and anything else can be discussed by mailto:~vonfry/[email protected] which lists on tickets or archived here.
zoxide-find-file
- find file under a path saved in zoxide. The path is
set to
default-directory
and then the callback is run. zoxide-find-file-with-query
- find file under a path matching query
zoxide-travel
- travel to a path saved in zoxide. The path is the first argument passing to callback.
zoxide-travel-with-query
- travel to a path matching query
zoxide-cd
- change working directory to a path
zoxide-cd-with-query
- change working directory to a path matching query
zoxide-add
- add path into database
zoxide-remove
- remove path from database
zoxide-query
- list all paths. This is equal to
(zoxide-query-with "-l")
. zoxide-query-with
- list paths matching query. If you call it interactively, a buffer will be prompted. Otherwise, it returns a list of paths.
zoxide-open-with
- a help function to query and open dir. It does an
action after zoxide-query by selecting with
completing-read-function
.
Just call functions.
You can add zoxide-add
into serval hooks to add paths automatically, such
as find-file-hook
, projectile-after-switch-project-hook
, etc.
This can change the default callback function for zoxide-find-file
.
This can change the default action to get path for zoxide-remove
and
zoxide-add
when path
is nil.
You can bind zoxide-find-file
to gz
or gZ
for quick jump.
You can use zoxide-open-with
with find-file
directly or something like
that:
(defun dired-jump-with-zoxide (&optional other-window)
(interactive "P")
(zoxide-open-with nil (lambda (file) (dired-jump other-window file)) t))