Created
April 2, 2015 15:46
-
-
Save jonEbird/c8be8560c5bd4490f4de to your computer and use it in GitHub Desktop.
Quickly split window and pull up your favorite projects file/buffer via keychord "PP"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Quickly split window and get to my projects File | |
(require 'key-chord) | |
(defvar my-projects-file "~/org/projects.org" | |
"My favorite projects file") | |
(defun switch-to-projects-other-window () | |
"Quickly open my favorite projects buffer in other window" | |
(interactive) | |
(let* ((project-filename (expand-file-name my-projects-file)) | |
(project-buffer (file-name-nondirectory project-filename))) | |
(if (get-buffer project-buffer) | |
(switch-to-buffer-other-window project-buffer) | |
(find-file-other-window project-filename)))) | |
(key-chord-define-global "PP" 'switch-to-projects-other-window) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment