diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2020-08-15 11:15:32 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2020-08-15 11:15:32 +0100 |
commit | ac3618ab5b3c00a085ea554b152977c6411fb7ca (patch) | |
tree | 3f5ea8165d0f03de8f041c6e7480f4b9adcdba6d | |
parent | 6562733a11fcb88944f5cd54bde3ca0ce6c03107 (diff) | |
download | dotfiles-ac3618ab5b3c00a085ea554b152977c6411fb7ca.tar.gz dotfiles-ac3618ab5b3c00a085ea554b152977c6411fb7ca.tar.bz2 dotfiles-ac3618ab5b3c00a085ea554b152977c6411fb7ca.zip |
~eshell: cleanup description, +toggle-eshell
Using the toggle functionality I defined earlier, create a toggle
eshell setup
-rw-r--r-- | Emacs/.config/emacs/config.org | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index c9ff9d5..23d6c3e 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -685,27 +685,28 @@ It may be argued that Emacs integrates within itself many of the functionalities that one would use within a shell or terminal. Stuff like compilation, file management, large scale text manipulation could be done through Emacs' own tools (=compile=, =dired= and =occur= come -to mind). +to mind). However, I'd argue that eshell's greatest ability comes from +it's separation (or perhaps better phrased, *integration*) of two +'parsers': the Lisp parser and the Shell parser. With these parsers +you can mix and match at will for use in the shell, which grants +greater power than many shells I know of. -However, the Eshell is still a useful tool even if you don't use it -for classical shell tasks. As it is integrated with Emacs, it actually -has two language parsers: one for standard shell scripting [echo -"Hello, world"] and one for Emacs lisp [(message "Hello, -world!")]. This means that eshell is essentially just a REPL for Emacs -lisp with extra shell capabilities. You can use programs defined in -any language (as long as it's in path and executable) and also run -lisp functions. This allows for mix-and-match capabilities when -needed, so cognitive load decreases as you can rely on either parsers -when necessary. +Setup a function that /toggles/ the eshell window rather than +just opening it via =+dx/toggle-buffer=. #+BEGIN_SRC emacs-lisp (use-package eshell :general (leader - "t" #'eshell) + "tt" #'+shell/toggle-eshell) :init (setq eshell-cmpl-ignore-case t - eshell-cd-on-directory t)) + eshell-cd-on-directory t) + :config + (defun +shell/toggle-eshell () + (interactive) + (+dx/toggle-buffer "*eshell*" #'eshell))) + #+END_SRC * Window management Window management is really important. I find the default window |