Emacs: show paren mode for matching parentheses.
Emacs: Zlc plugin for Zsh-style completion.master
parent
93003cf2e1
commit
6609385cce
|
@ -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)
|
||||
|
||||
|
|
|
@ -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 "<down>") 'zlc-select-next-vertical)
|
||||
(define-key map (kbd "<up>") 'zlc-select-previous-vertical)
|
||||
(define-key map (kbd "<right>") 'zlc-select-next)
|
||||
(define-key map (kbd "<left>") '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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue