summaryrefslogtreecommitdiffhomepage
path: root/init.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-02-28 05:30:01 +0000
committerjao <jao@gnu.org>2021-02-28 05:30:01 +0000
commitefa2329513620f52cf2b7465e16f64b90c655b13 (patch)
treeb31a16f1340b8d747c4bb3dad1256fbae255df24 /init.org
parent9164a4ac324f865c29ea90f0735cc0b6151aba4f (diff)
downloadelibs-efa2329513620f52cf2b7465e16f64b90c655b13.tar.gz
elibs-efa2329513620f52cf2b7465e16f64b90c655b13.tar.bz2
eshell trick to use outlines
Diffstat (limited to 'init.org')
-rw-r--r--init.org18
1 files changed, 12 insertions, 6 deletions
diff --git a/init.org b/init.org
index b2f51e6..0ac4769 100644
--- a/init.org
+++ b/init.org
@@ -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)