paulodder / quick-find-el

Tiny framework for jumping to custom-defined (remote) directories

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

quick-find.el

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:

quick-find-file

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.

quick-find-file-as-root

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.

quick-find-shell

Open new shell in chosen directory.

setting up

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)

key-bindings

I chose the following key-bindings, but see what works for you

quick-find-fileC-x C-j
quick-find-file-as-rootC-x C-M-j

About

Tiny framework for jumping to custom-defined (remote) directories


Languages

Language:Emacs Lisp 100.0%