Skip to content

Commit

Permalink
Switch to emacs mode and back to normal mode to make gtags bindings w…
Browse files Browse the repository at this point in the history
…ork.
  • Loading branch information
winfred-lu committed Jan 25, 2012
1 parent a1aeea2 commit e2ff9f6
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions winfred-evil.el
Expand Up @@ -55,7 +55,14 @@
;; key bindings for cc-mode
(eval-after-load 'cc-mode
'(progn
(evil-define-key 'insert c-mode-map (kbd "RET") 'newline-and-indent)))
(evil-define-key 'insert c-mode-map (kbd "RET") 'evil-ret)))

;; switch evil mode to apply gtags key bindings
(setq c-mode-hook
'(lambda ()
(gtags-mode 1)
(evil-emacs-state)
(evil-normal-state)))

;; key bindings for custom-mode
(eval-after-load "cus-edit"
Expand All @@ -74,7 +81,7 @@
'(progn
(evil-define-key 'insert emacs-lisp-mode-map (kbd "RET") 'evil-ret)))

;; key bindings for gtags (FIXME)
;; key bindings for gtags
(eval-after-load "gtags"
'(progn
(evil-define-key 'normal gtags-mode-map "\C-]" 'gtags-find-tag-from-here)
Expand Down Expand Up @@ -133,4 +140,4 @@
(lambda () (interactive)
(org-end-of-line)
(org-insert-heading)
(evil-append nil)))))
(evil-append nil)))))

0 comments on commit e2ff9f6

Please sign in to comment.