emacs-personal/lisp/init-editing-utils.el
Jesús 0aee87cf38
- Refactoring diminish mode
The diminish mode is activated, which helps us to keep the modeline clean.
As we see, in the modeline the modes that are activated are shown, and every time
we have more activated minor-modes, which add small functionalities to Emacs.
In this case, there are many modes, that if they do not appear, nothing happens.
So we hide some, like undo-tree that will always be activated.
2018-10-02 16:45:08 -05:00

44 lines
1.7 KiB
EmacsLisp

;; Delete trailing whitespace before saving fil
(add-hook 'before-save-hook 'delete-trailing-whitespace)
;; Automatic pairs open symbols (, {, [...
;; Disable for default.
;; Uncomment the next 4 lines if you want to enable the pairs-mode
;;(when (fboundp 'electric-pair-mode)
;; (electric-pair-mode))
;;(when (eval-when-compile (version< "24.4" emacs-version))
;; (electric-indent-mode 1))
;; Active auto-revert-mode that automatically reloads modified files out of Emacs.
;; It is very useful to see logs (like auto-revert-tail-mode) among many other cases.
(global-auto-revert-mode)
(setq global-auto-revert-non-file-buffers t
auto-revert-verbose nil)
;;----------------------------------------------------------------------------
;; Show matching parens
;;----------------------------------------------------------------------------
(show-paren-mode 1)
;;----------------------------------------------------------------------------
;; More useful things - only one line
;;----------------------------------------------------------------------------
(set-default 'truncate-lines t)
(setq show-trailing-whitespace nil)
;;----------------------------------------------------------------------------
;; Some basic preferences
;;----------------------------------------------------------------------------
(setq-default
indent-tabs-mode nil)
;;----------------------------------------------------------------------------
;; Undo-tree
;;----------------------------------------------------------------------------
(require-package 'undo-tree)
(global-undo-tree-mode)
;;----------------------------------------------------------------------------
(myemacs/elapsed-time)
(provide 'init-editing-utils)