#+END_SRC
Revised powerline-center-theme
-
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
(defun sd/powerline-simpler-vc (s)
(if s
(replace-regexp-in-string "Git[:-]" "" s)
s))
- (defface sd/powerline-active1 '((t (:background "yellow" :foreground "red" :inherit mode-line)))
+ (defface sd/powerline-active1 '((t (:background "yellow" :foreground "black" :inherit mode-line)))
+ "My Powerline face 1 based on powerline-active1."
+ :group 'powerline)
+
+ (defface sd/buffer-modified-active1 '((t (:background "red" :foreground "black" :inherit mode-line)))
"My Powerline face 1 based on powerline-active1."
:group 'powerline)
(defface sd/mode-line-buffer-id
'((t (:background "yellow" :foreground "black" :inherit mode-line-buffer-id)))
- "Powerline mode-line face"
+ "My powerline mode-line face, based on mode-line-buffer-id"
:group 'powerline)
+ ;; Don't show buffer modified for scratch and eshell mode
+ (defun sd/buffer-show-modified ()
+ "Dot not show modified indicator for buffers"
+ (interactive)
+ (unless (or (string-match "*scratch*" (buffer-name))
+ (equal major-mode 'eshell-mode))
+ t))
+
(defun sd/powerline-center-theme_revised ()
"Setup a mode-line with major and minor modes centered."
(interactive)
(mode-line-buffer-id (if active 'sd/mode-line-buffer-id 'mode-line-buffer-id-inactive))
(mode-line (if active 'mode-line 'mode-line-inactive))
(my-face1 (if active 'sd/powerline-active1 'powerline-inactive1))
+ (my-face-buffer-modified (if (and (sd/buffer-show-modified) (buffer-modified-p))
+ 'sd/buffer-modified-active1
+ my-face1))
(face1 (if active 'powerline-active1 'powerline-inactive1))
(face2 (if active 'powerline-active2 'powerline-inactive2))
(separator-left (intern (format "powerline-%s-%s"
(separator-right (intern (format "powerline-%s-%s"
(powerline-current-separator)
(cdr powerline-default-separator-dir))))
- (lhs (list (powerline-raw "%*" my-face1 'l)
+ (lhs (list (powerline-raw "%* " my-face-buffer-modified 'l)
;; (powerline-buffer-size mode-line 'l)
(powerline-buffer-id mode-line-buffer-id 'l)
(powerline-raw " " my-face1)
;; ;; Turn off RUN-TOGETHER option when spell check text-mode
;; (setq-local ispell-extra-args (flyspell-detect-ispell-args)))
;; (add-hook 'text-mode-hook 'text-mode-hook-setup)
- (add-hook 'text-mode-hook 'flyspell-mode)
+ ;; (add-hook 'text-mode-hook 'flyspell-mode)
;; enable flyspell check on comments and strings in progmamming modes
- (add-hook 'prog-mode-hook 'flyspell-prog-mode)
+ ;; (add-hook 'prog-mode-hook 'flyspell-prog-mode)
;; I don't use the default mappings
(with-eval-after-load 'flyspell
(sh . t)
(sqlite . t)
(js . t)
- (gnuplot . t)))
+ (gnuplot . t)
+ (ditaa . t)))
;; use current window for org source buffer editting
(setq org-src-window-setup 'current-window )
** TODO Man mode
Color for Man-mode
-#+BEGIN_SRC emacs-lisp :tangle yes :results silent
- ;; (add-hook 'Man-mode-hook (lambda ()
- ;; (interactive)
- ;; (setenv "GROFF_NO_SRG")))
-#+END_SRC
** TODO swiper to occur
)))
#+END_SRC
-*** Keywords
+*** Perl Keywords
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
(font-lock-add-keywords 'cperl-mode
- '(("\\(say\\)" . font-lock-function-name-face)))
+ '(("\\(say\\)" . cperl-nonoverridable-face)
+ ("\\([0-9.]\\)*" . font-lock-constant-face)
+ ("\".*\\(\\\n\\).*\"" . font-lock-constant-face)
+ ("\n" . font-lock-constant-face)
+ ("\\(^#!.*\\)$" . cperl-nonoverridable-face)))
+
+ ;; (font-lock-add-keywords 'Man-mode
+ ;; '(("\\(NAME\\)" . font-lock-function-name-face)))
- (font-lock-add-keywords 'Man-mode
- '(("\\(NAME\\)" . font-lock-function-name-face)))
#+END_SRC
*** Run Perl
#+BEGIN_SRC emacs-lisp :tangle yes :results silent
(font-lock-add-keywords 'perl-mode '(("\\(|\\w+?\\(,\\w+?\\)?|\\)" 1 'py-builtins-face)))
-
- (font-lock-add-keywords
- 'cperl-mode
- '(("\\(say\\)" . font-lock-constant-face)))
#+END_SRC
+* TODO set fly-spell binding
+
+* TODO imenu bindings
+
+* TODO modified indicator
+* TODO highlight selected ido candicate