diff --git a/.emacs.d/main.el b/.emacs.d/main.el index faef8ab8..690798e3 100644 --- a/.emacs.d/main.el +++ b/.emacs.d/main.el @@ -149,3 +149,10 @@ browse-url-browser-function 'browse-url-generic) ;; forward-paragraph. (setq paragraph-start " ") + +;; Show matching parenthesis +(show-paren-mode 1) +;; By default, there’s a small delay before showing a matching parenthesis. Set +;; it to 0 to deactivate. +(setq show-paren-delay 0) + diff --git a/.emacs.d/plugins.el b/.emacs.d/plugins.el index 8c582a98..766e9e6c 100644 --- a/.emacs.d/plugins.el +++ b/.emacs.d/plugins.el @@ -76,6 +76,7 @@ (turn-off-auto-fill) (define-key mediawiki-mode-map (kbd "C-c RET") 'mediawiki-open-page-at-point) (define-key mediawiki-mode-map (kbd "C-c o") 'mediawiki-browse) + (local-unset-key (kbd "M-g")) ;; TODO: Bindings to not work??? ;; (local-set-key (kbd "C-c l L") 'ltx-template-source-to-latex) ;; (local-set-key (kbd "C-c l U") 'ltx-template-source-to-usage) @@ -94,3 +95,24 @@ ;; (doxymacs-font-lock))) ;; (add-hook 'font-lock-mode-hook 'my-doxymacs-font-lock-hook) + +;;============================================================================== +;; Zlc +;;============================================================================== +;; Zsh style completion. + +(require 'zlc) +(let ((map minibuffer-local-map)) + ;;; like menu select + (define-key map (kbd "") 'zlc-select-next-vertical) + (define-key map (kbd "") 'zlc-select-previous-vertical) + (define-key map (kbd "") 'zlc-select-next) + (define-key map (kbd "") 'zlc-select-previous) + + ;;; reset selection + (define-key map (kbd "C-c") 'zlc-reset) + ) + +(setq zlc-select-completion-immediately t) + +;; To change style, M-x customize-face and input zlc-selected-completion-face. diff --git a/.emacs.d/theme.el b/.emacs.d/theme.el index 3fe21f81..31f56f8a 100644 --- a/.emacs.d/theme.el +++ b/.emacs.d/theme.el @@ -46,13 +46,10 @@ (set-face-foreground 'ediff-odd-diff-A "black") )) -;; FIXME: fix C functions color. -(font-lock-add-keywords - 'c-mode - '( - ("&" . font-lock-keyword-face) - ("\\<\\(and\\|or\\|not\\)\\>" . font-lock-keyword-face) - )) +;; Show paren. +(set-face-background 'show-paren-match-face (face-background 'default)) +(set-face-foreground 'show-paren-match-face "#def") +(set-face-attribute 'show-paren-match-face nil :weight 'extra-bold) ;; Make Emacs and Mutt colors fit. (font-lock-add-keywords @@ -98,25 +95,33 @@ c-mode python-mode latex-mode html-mode texinfo-mode)) -;; C-mode printf highlight. -(defvar font-lock-format-specifier-face 'font-lock-format-specifier-face - "Face name to use for format specifiers.") +;; FIXME: fix C functions color. +;; (font-lock-add-keywords +;; 'c-mode +;; '( +;; ("&" . font-lock-keyword-face) +;; ("\\<\\(and\\|or\\|not\\)\\>" . font-lock-keyword-face) +;; )) -(defface font-lock-format-specifier-face - '((t (:foreground "OrangeRed1"))) - "Font Lock mode face used to highlight format specifiers." - :group 'font-lock-faces) +;; C-mode printf highlight. +;; (defvar font-lock-format-specifier-face 'font-lock-format-specifier-face +;; "Face name to use for format specifiers.") + +;; (defface font-lock-format-specifier-face +;; '((t (:foreground "OrangeRed1"))) +;; "Font Lock mode face used to highlight format specifiers." +;; :group 'font-lock-faces) ;; FIXME: disable highlighting outside of string. -(add-hook - 'c-mode-common-hook - (lambda () - (font-lock-add-keywords - nil - '(("[^%]\\(%\\([[:digit:]]+\\$\\)?[-+' #0*]*\\([[:digit:]]*\\|\\*\\|\\*[[:digit:]]+\\$\\)\\(\\.\\([[:digit:]]*\\|\\*\\|\\*[[:digit:]]+\\$\\)\\)?\\([hlLjzt]\\|ll\\|hh\\)?\\([aAbdiuoxXDOUfFeEgGcCsSpn]\\|\\[\\^?.[^]]*\\]\\)\\)" - 1 font-lock-format-specifier-face t) - ("\\(%%\\)" - 1 font-lock-format-specifier-face t)) ))) +;; (add-hook +;; 'c-mode-common-hook +;; (lambda () +;; (font-lock-add-keywords +;; nil +;; '(("[^%]\\(%\\([[:digit:]]+\\$\\)?[-+' #0*]*\\([[:digit:]]*\\|\\*\\|\\*[[:digit:]]+\\$\\)\\(\\.\\([[:digit:]]*\\|\\*\\|\\*[[:digit:]]+\\$\\)\\)?\\([hlLjzt]\\|ll\\|hh\\)?\\([aAbdiuoxXDOUfFeEgGcCsSpn]\\|\\[\\^?.[^]]*\\]\\)\\)" +;; 1 font-lock-format-specifier-face t) +;; ("\\(%%\\)" +;; 1 font-lock-format-specifier-face t)) ))) ;; FIXME: Does not work. ;; (add-hook