eshell: remove margins & wrap lines

Margins cause many full-line progress bars to become jumpy; scrolling to
follow the cursor at eol (just beyond the edge of the window). It's
better to not use margins at all.

Also, this change removes the $ truncation glyphs and enables
visual-line-mode to wrap long text.
This commit is contained in:
Henrik Lissner 2018-07-01 01:19:30 +02:00
parent 4213899b01
commit 637131a264
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -82,11 +82,15 @@ You should use `det-eshell-alias!' to change this.")
(add-hook 'eshell-mode-hook #'smartparens-mode)
;; UI enhancements
(defun +eshell|replace-fringes-with-margins ()
"Remove eshell's fringes and give it a margin of 1."
(set-window-fringes nil 0 0)
(set-window-margins nil 1 1))
(add-hook 'eshell-mode-hook #'+eshell|replace-fringes-with-margins)
(defun +eshell|remove-fringes ()
(set-window-fringes nil 0 0))
(add-hook 'eshell-mode-hook #'+eshell|remove-fringes)
(defun +eshell|enable-text-wrapping ()
(visual-line-mode +1)
(set-display-table-slot standard-display-table 0 ?\ ))
(add-hook 'eshell-mode-hook #'+eshell|enable-text-wrapping)
(add-hook 'eshell-mode-hook #'hide-mode-line-mode)
;; Don't auto-write our aliases! Let us manage our own `eshell-aliases-file'