Add suggestion to use outline-minor-mode in Eshell
This commit is contained in:
parent
70d0ed7b5e
commit
2495767296
14
gists.org
14
gists.org
|
@ -315,6 +315,20 @@ My vertico-repeat setup.
|
|||
(f "This does not work."))
|
||||
#+end_src
|
||||
|
||||
* Use outline-minor-mode with eshell :emacs:eshell:
|
||||
|
||||
Found [[https://www.reddit.com/r/emacs/comments/e2u5n9/comment/f918t22/][a Reddit comment]] suggesting to assign the prompt regexp to the outline regexp. Here's the corresponding =use-package= syntax:
|
||||
|
||||
#+begin_src elisp :tangle gists/outline-minor-mode-eshell.el
|
||||
;; use C-c @ C-t to get a foldable shell history
|
||||
(use-package eshell
|
||||
:config
|
||||
(add-hook 'eshell-mode-hook
|
||||
(lambda () (setq-local outline-regexp eshell-prompt-regexp)))
|
||||
:hook
|
||||
(eshell-mode . outline-minor-mode))
|
||||
#+end_src
|
||||
|
||||
* Meta
|
||||
** License
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
;; use C-c @ C-t to get a foldable shell history
|
||||
(use-package eshell
|
||||
:config
|
||||
(add-hook 'eshell-mode-hook
|
||||
(lambda () (setq-local outline-regexp eshell-prompt-regexp)))
|
||||
:hook
|
||||
(eshell-mode . outline-minor-mode))
|
Loading…
Reference in New Issue