Move modeline stuff in its own section

master
Jacopo De Simoi 8 years ago
parent ff7e94e361
commit a77c430dbe
  1. 75
      global.org

@ -130,6 +130,44 @@
(setq-default display-buffer-reuse-frames t)
#+END_SRC
** Modeline
#+BEGIN_SRC emacs-lisp
(setq-default mode-line-modified '(:eval (if (buffer-modified-p) " " "·"))) ;still needs some improvements,
;does not report Readonly state
(setq-default mode-line-remote '(:eval (let ((s (format-mode-line "%@")))
(cond
((equal s "-") "·") ((equal s "@") "@") (t s)))))
(defvar wilder-buffer-vc-mode-line
'("%b" (vc-mode (:propertize
;; Strip the backend name from the VC status information
(:eval (let* ((backend (downcase (symbol-name (vc-backend (buffer-file-name)))))
(branch (substring vc-mode (+ (length backend) 2)))
(s (substring vc-mode (+ (length backend) 1) (+ (length backend) 2)))
(status (cond ((equal s "-") "") ((equal s ":") "!") (t s))))
(concat "·" branch status)))
face font-lock-comment-face))))
(put 'wilder-buffer-vc-mode-line 'risky-local-variable t)
(defvar wilder-position
'("[%p,%I] " ))
(put 'wilder-position 'risky-local-variable t)
(setq-default mode-line-format
'("%e"
mode-line-front-space
mode-line-mule-info
mode-line-client
mode-line-modified
mode-line-remote
mode-line-frame-identification
wilder-buffer-vc-mode-line " "
wilder-position " "
mode-line-modes
mode-line-misc-info
mode-line-end-spaces))
#+END_SRC
** Whitespace
Trailing whitespace is evil; get rid of it
*** TODO Have a look at ws-trim.el
@ -417,43 +455,6 @@ This is the same as using \\[set-mark-command] with the prefix argument."
;; (ibuffer-switch-to-saved-filter-groups "default")))
;; * mode-line setup
(setq-default mode-line-modified '(:eval (if (buffer-modified-p) "●" "·"))) ;still needs some improvements, does not report Readonly state
(setq-default mode-line-remote '(:eval (let ((s (format-mode-line "%@")))
(cond
((equal s "-") "·") ((equal s "@") "@") (t s)))))
(defvar wilder-buffer-vc-mode-line
'("%b" (vc-mode (:propertize
;; Strip the backend name from the VC status information
(:eval (let* ((backend (downcase (symbol-name (vc-backend (buffer-file-name)))))
(branch (substring vc-mode (+ (length backend) 2)))
(s (substring vc-mode (+ (length backend) 1) (+ (length backend) 2)))
(status (cond ((equal s "-") "") ((equal s ":") "!") (t s))))
(concat "·" branch status)))
face font-lock-comment-face))))
(put 'wilder-buffer-vc-mode-line 'risky-local-variable t)
(defvar wilder-position
'("[%p,%I] " ))
(put 'wilder-position 'risky-local-variable t)
(setq-default mode-line-format
'("%e"
mode-line-front-space
mode-line-mule-info
mode-line-client
mode-line-modified
mode-line-remote
mode-line-frame-identification
wilder-buffer-vc-mode-line " "
wilder-position " "
mode-line-modes
mode-line-misc-info
mode-line-end-spaces))
;; * toorg
(require 'outshine)
(add-hook 'outline-minor-mode-hook 'outshine-hook-function)
(setq outshine-use-speed-commands t)

Loading…
Cancel
Save