Last active
April 5, 2020 15:23
-
-
Save gausby/6f9922f2a5ebd4a2445fb8bf9512b5c7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(use-package eshell | |
:after projectile | |
:preface | |
(defun universal-argument-eshell () | |
"wrap the `eshell'-command, with a check for whether or not | |
the universal argument has been applied, and how many times. | |
Zero times: normal behavior (eshell); Once: open a shell in the | |
current project root" | |
(interactive) | |
(cond ((equal current-prefix-arg nil) | |
(call-interactively 'eshell)) | |
((equal current-prefix-arg (list 4)) | |
(projectile-run-eshell)) | |
)) | |
;; mode hook | |
(defun mg/my-eshell-mode-hook () | |
(set (make-local-variable 'global-hl-line-mode) nil)) | |
;; :hook (eshell-mode . mg/my-eshell-mode-hook) | |
;; :bind | |
:config | |
(bind-keys | |
("C-x C-t" . universal-argument-eshell))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment