Skip to content

Vonfry/zoxide.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zoxide.el

Find file and open directory in special directory with zoxide.

Descriptions

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.

Functions

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.

Usage

Just call functions.

Hooks

You can add zoxide-add into serval hooks to add paths automatically, such as find-file-hook, projectile-after-switch-project-hook, etc.

Customize

zoxide-find-file-function

This can change the default callback function for zoxide-find-file.

zoxide-get-path-function

This can change the default action to get path for zoxide-remove and zoxide-add when path is nil.

Evil

You can bind zoxide-find-file to gz or gZ for quick jump.

Dired/Dirvish/Ranger/…

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))

About

This repo is a mirror. Zoxide for finding file and open directory.

Topics

Resources

License

Stars

Watchers

Forks