Tiny framework to facilitate quickly jumping to custom-defined directories (both locally and remote locations).
Define names and corresponding directories as follows:
(setq quick-find-name2dir '(("emacs.d" . "~/.emacs.d")
("home" . "~/")
("remote/hostname" . "/ssh:<user>@<hostname>:/home/<user>/")))
The following two interactive functions are defined:
Prompts you with a list of names (as defined in quick-find-name2dir
) to
choose from, and runs find-file
in the directory corresponding to the chosen
name.
Prompts you with a list of names (as defined in quick-find-name2dir
) to
choose from, and runs find-file
in the directory corresponding to the chosen
name but with a prefix so that any file you open is opened as root.
Open new shell in chosen directory.
Clone this repo in ~/.emacs.d/
git clone https://github.com/paulodder/quick-find-el
Add path to that repo to your load-path
variable
(add-to-list 'load-path "~/.emacs.d/quick-find-el")
(require quick-find)
I chose the following key-bindings, but see what works for you
quick-find-file | C-x C-j |
quick-find-file-as-root | C-x C-M-j |