[Emacs] Disable trailing whitespace in term-mode
This commit is contained in:
parent
10e39bb932
commit
3f77cacb47
@ -1006,6 +1006,13 @@ with random whitespace ALL over the place.
|
|||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq-default show-trailing-whitespace t)
|
(setq-default show-trailing-whitespace t)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
*** Disable
|
||||||
|
Unfortunately, this setting can get annoying in a lot of modes, which is why I
|
||||||
|
use this hook to disable it in those modes
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(defun imalison:disable-show-trailing-whitespace ()
|
||||||
|
(setq show-trailing-whitespace nil))
|
||||||
|
#+END_SRC
|
||||||
** Encoding
|
** Encoding
|
||||||
UTF-8 everywhere
|
UTF-8 everywhere
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
@ -1806,9 +1813,7 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab
|
|||||||
(progn
|
(progn
|
||||||
(defun imalison:after-magit-visit-file (&rest args)
|
(defun imalison:after-magit-visit-file (&rest args)
|
||||||
(when (derived-mode-p 'org-mode)
|
(when (derived-mode-p 'org-mode)
|
||||||
(org-show-context 'magit-goto)))
|
(org-show-context 'magit-goto))))
|
||||||
(defun imalison:magit-popup-mode-hook ()
|
|
||||||
(setq show-trailing-whitespace nil)))
|
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
(unbind-key "C-j" magit-status-mode-map)
|
(unbind-key "C-j" magit-status-mode-map)
|
||||||
@ -1823,7 +1828,7 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab
|
|||||||
|
|
||||||
(add-to-list 'org-show-context-detail '(magit-goto . lineage))
|
(add-to-list 'org-show-context-detail '(magit-goto . lineage))
|
||||||
(advice-add 'magit-diff-visit-file :after 'imalison:after-magit-visit-file)
|
(advice-add 'magit-diff-visit-file :after 'imalison:after-magit-visit-file)
|
||||||
(add-hook 'magit-popup-mode-hook 'imalison:magit-popup-mode-hook)
|
(add-hook 'magit-popup-mode-hook 'imalison:disable-show-trailing-whitespace)
|
||||||
(use-package magit-filenotify
|
(use-package magit-filenotify
|
||||||
;; Seems like OSX does not support filenotify.
|
;; Seems like OSX does not support filenotify.
|
||||||
:disabled t
|
:disabled t
|
||||||
@ -3254,6 +3259,7 @@ emr (emacs refactor) provides support for refactoring in many programming langua
|
|||||||
(progn
|
(progn
|
||||||
(define-key term-raw-map (kbd "C-h") help-map)
|
(define-key term-raw-map (kbd "C-h") help-map)
|
||||||
(add-hook 'term-mode-hook 'imalison:disable-linum-mode)
|
(add-hook 'term-mode-hook 'imalison:disable-linum-mode)
|
||||||
|
(add-hook 'term-mode-hook 'imalison:disable-show-trailing-whitespace)
|
||||||
(setq term-buffer-maximum-size 0)))
|
(setq term-buffer-maximum-size 0)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** term-manager
|
** term-manager
|
||||||
|
Loading…
Reference in New Issue
Block a user