Skip to content

Instantly share code, notes, and snippets.

@acro5piano
Last active February 7, 2017 16:12
Show Gist options
  • Save acro5piano/d0126cfe1ddcdf29c9d0fa397f46119d to your computer and use it in GitHub Desktop.
Save acro5piano/d0126cfe1ddcdf29c9d0fa397f46119d to your computer and use it in GitHub Desktop.
Evilで、スペースキーを起点としたキーバインドがかなり快適 ref: http://qiita.com/acro5piano/items/adaa18258435b870441e
(bind-key* "ESC" evil-mode)
(add-hook 'evil-insert-mode-hook
(lambda() (evil-mode nil)))
(defalias 'evil-insert-state 'evil-emacs-state)
(define-key evil-emacs-state-map (kbd "<escape>") 'evil-normal-state)
(require 'evil)
(evil-mode t)
(if (evil-mode)
(progn
(bind-keys :map evil-visual-state-map
("TAB" . indent-for-tab-command))
(bind-keys :map evil-normal-state-map
("SPC b" . ido-switch-buffer)
("SPC f" . projectile-find-file)
("SPC a" . helm-do-ag-project-root)
("SPC x" . smex)
("SPC s" . save-buffer)
("SPC d" . dired-jump)
("SPC k" . kill-this-buffer)
("SPC r" . ido-recentf-open)
("SPC 1" . delete-other-windows)
("SPC 0" . delete-window)
("SPC q" . delete-frame)
("SPC t" . xref-find-definitions-other-window)
("SPC y" . browse-kill-ring)
("SPC u" . undo-tree)
("TAB" . indent-for-tab-command))
(bind-keys :map evil-insert-state-map
("C-g" . evil-normal-state)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment