My attempt to optimize my emacs load time <1 second
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

27 lines
821 B

;;; 03-custom-binds --- A set of custom key bindings
;;; Commentary:
;;; Code:
(defvar my-term-shell "/bin/bash" "My preferred choice of shell.")
(defadvice ansi-term (before force-bash)
"Open an interactive ansi-terminal that defaults to bash."
(interactive (list my-term-shell)))
;; (ad-activate 'ansi-term)
;; Get shell env vars.
(let ((path (shell-command-to-string ". /home/leothelocust/.bashrc; echo -n $PATH")))
(setenv "PATH" (concat path ":/usr/local/bin"))
(setq exec-path
(append
(split-string-and-unquote (concat path ":/usr/local/bin") ":")
exec-path)))
(bind-key "<M-return>" 'eshell)
(bind-key "<C-M-return>" 'ansi-term)
(bind-key "C-c R" '(lambda () (interactive) (load-file user-init-file)))
(provide '03-custom-binds)
;;; 03-custom-binds.el ends here