Advertisement
Guest User

Untitled

a guest
Apr 9th, 2020
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. ** Командная строка eshell
  2.  
  3. *** Базовая настройка Eshell
  4.  
  5. #+begin_src elisp :tangle my_prog.el :exports code
  6. (use-package eshell
  7. :config
  8. (require 'em-hist)
  9. (use-package eshell-git-prompt
  10. :config
  11. ;; the powerline prompt is best but I've no idea how to shorten it to the last directory.
  12. (eshell-git-prompt-use-theme 'powerline)
  13. (define-advice eshell-git-prompt-powerline-dir (:override () short)
  14. "Show only last directory."
  15. (file-name-nondirectory (directory-file-name default-directory))))
  16. :bind (:map eshell-hist-mode-map
  17. ("<down>" . 'next-line)
  18. ("<up>" . 'previous-line)
  19. ([remap eshell-previous-matching-input-from-input] . helm-eshell-history)
  20. ([remap eshell-list-history] . helm-eshell-history)
  21. ))
  22. #+end_src
  23.  
  24. *** Выпадающая консоль
  25.  
  26. Аналог работы guake терминала только терминал в emacs. Открывается на
  27. *C-`*. Т.к. я не сильно освоил, то максимум полезно запустить что-то в
  28. консоли из той же папки что и файл.
  29.  
  30. #+begin_src elisp :tangle my_prog.el :exports code
  31. (use-package eshell-toggle
  32. :custom
  33. (eshell-toggle-size-fraction 3)
  34. (eshell-toggle-run-command nil)
  35. (eshell-toggle-use-projectile-root t)
  36. (eshell-toggle-init-function #'eshell-toggle-init-eshell)
  37. :bind
  38. ("C-`" . eshell-toggle))
  39. #+end_src
  40.  
  41. *** Eshell - треугольник
  42.  
  43. #+begin_src elisp :tangle my_prog.el :exports code
  44.  
  45. ;; Мелкий треугольник показывающий расположение команд в вввода в консоли.
  46. (use-package eshell-fringe-status
  47. :config
  48. (add-hook 'eshell-mode-hook 'eshell-fringe-status-mode))
  49.  
  50. #+end_src
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement