diff options
author | jao <jao@gnu.org> | 2021-02-28 05:30:01 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-02-28 05:30:01 +0000 |
commit | efa2329513620f52cf2b7465e16f64b90c655b13 (patch) | |
tree | b31a16f1340b8d747c4bb3dad1256fbae255df24 /init.org | |
parent | 9164a4ac324f865c29ea90f0735cc0b6151aba4f (diff) | |
download | elibs-efa2329513620f52cf2b7465e16f64b90c655b13.tar.gz elibs-efa2329513620f52cf2b7465e16f64b90c655b13.tar.bz2 |
eshell trick to use outlines
Diffstat (limited to 'init.org')
-rw-r--r-- | init.org | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -2766,11 +2766,16 @@ #+end_src *** Eshell ***** Basic custom - #+BEGIN_SRC emacs-lisp - (setq eshell-directory-name "~/.emacs.d/eshell") - (setq eshell-aliases-file (jao-data-file "eshell.alias")) - (setq eshell-hist-ignoredups 'erase) - #+END_SRC + #+begin_src emacs-lisp + (use-package eshell + :init + (setq eshell-directory-name "~/.emacs.d/eshell") + (setq eshell-aliases-file (jao-data-file "eshell.alias")) + (setq eshell-hist-ignoredups 'erase) + :config + (add-hook 'eshell-mode-hook + (lambda () (setq outline-regexp eshell-prompt-regexp)))) + #+end_src ***** Colors #+begin_src emacs-lisp (autoload 'ansi-color-apply "ansi-color") @@ -2906,7 +2911,8 @@ ***** Keybindings #+begin_src emacs-lisp (defun jao-eshell--kbds () - (define-key eshell-mode-map "\C-a" 'jao-eshell-maybe-bol)) + (define-key eshell-mode-map "\C-a" 'jao-eshell-maybe-bol) + (define-key eshell-mode-map "\C-ci" 'consult-outline)) ;; Eshell mode is sillily re-creating its mode map ;; in every buffer in emacs < 28. (if (> emacs-major-version 27) |