emacs里面模拟vim按键操作的插件evil

emacsConfig/evil-setting.el

 1 (setq evil-mode t)
 2 (setq evil-shift-width 2)
 3 
 4 ;; some modes aren't meant for evil
 5 (dolist (m '(el-get-package-menu-mode git-status-mode grep-mode))
 6         (add-to-list 'evil-emacs-state-modes m))
 7 
 8 ;; Remap org-mode meta keys for convenience
 9 (mapcar (lambda (evil-state)
10           (evil-declare-key evil-state org-mode-map
11             (kbd "M-l") 'org-metaright
12             (kbd "M-h") 'org-metaleft
13             (kbd "M-k") 'org-metaup
14             (kbd "M-j") 'org-metadown
15             (kbd "M-L") 'org-shiftmetaright
16             (kbd "M-H") 'org-shiftmetaleft
17             (kbd "M-K") 'org-shiftmetaup
18             (kbd "M-J") 'org-shiftmetadown))
19         '(normal insert))
20 
21 
22 (define-key evil-normal-state-map "g;" 'session-jump-to-last-change)
23 (define-key evil-normal-state-map "\\be" 'ibuffer)
24 (define-key evil-normal-state-map "\\\\" 'switch-to-buffer)
25 (define-key evil-normal-state-map ";;" 'evil-buffer)
26 (define-key evil-normal-state-map ";\\" 'delete-other-windows)
27 (define-key evil-normal-state-map "\\d" 'dired)
28 (define-key evil-normal-state-map "\\f" 'ido-find-file)
29 (define-key evil-normal-state-map ";x" 'smex)
30 (define-key evil-visual-state-map ";x" 'smex)
31 (define-key evil-normal-state-map ";X" 'smex-update-and-run)
32 ;;(define-key evil-normal-state-map ";p" 'textmate-goto-file)

 

你可能感兴趣的:(emacs)