/transjump

Quickly jump to your favorite folders with transient.el

Primary LanguageEmacs Lisp

DEPRECATED

I no longer use it, but choose a simple solution with hydra. As a result I don’t even know if it is still working with latest transient version.

(defhydra hydra-jump (evil-motion-state-map "C-e")
  "Jump"
  ("f" (lambda () (interactive) (find-file "path/folder/1")))
  ("v" (lambda () (interactive) (find-file "path/folder/2")))
  ("r" (lambda () (interactive) (find-file "path/folder/3")))
  ("d" (lambda () (interactive) (find-file "path/folder/4")))
  ("h" (lambda () (interactive) (find-file "~"))))

Transjump

Quickly jump to your favorite folders with transient.el

Motivation

Packages such as projectile.el or even the built-in project.el offer a good way to navigate through a lot of differents projects but I felt it was a bit slow for the top 3/4 projects I’m constantly working on. I’m constantly switching from one project to another and having to type `C-x p p` then typing the first letter of the project name was too much for me.

Overview

With transjump, I define a list of favorite folders and attribute to each folder a `key` and a `name`.

(setq transjump-folders
		'((:name  "frontend" :key  "f" :path  "~/path/to/front/project")
		  (:name  "backend" :key  "b" :path  "~/path/to/back/project")
		  (:name  "home" :key  "h" :path  "~")
		  (:name  "downloads" :key  "m" :path  "~/Downloads")
		  (:name  "music" :key  "m" :path  "~/Music")))

And transjump will generate a transient menu.

https://github.com/flocks/transjump/raw/master/transjump.png

So I can jump the desired folder with a single keypress.

Sometimes switching to the folder is not enough and you want to create a dedicated tab for it. In this case you can use the switch `-t` to toggle tab mode. As always with transient you can use `C-x s` to set the switches for the current session or `C-x C-s` to save for future sessions. It can be very convenient to set tab mode for a while when you are working on 2 projects at the same time and you don’t want to loose a specific window configuration on the 2 projects.

  • complete README
  • better type for defcustom transjump-folders
  • clean code
  • write tests