Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

evil: Added ZZ, :make, :cn, :cp.

  • Loading branch information...
commit 13ea3ec0727d4288f41286883fa7bdbb1dcb7767 1 parent 9078886
@jgm authored
Showing with 24 additions and 2 deletions.
  1. +13 −1 evil-customizations.el
  2. +11 −1 init.el
View
14 evil-customizations.el
@@ -83,6 +83,19 @@
(evil-define-key 'normal org-mode-map (kbd "M-K") 'org-shiftmetaup)
(evil-define-key 'normal org-mode-map (kbd "M-J") 'org-shiftmetadown)
+;;; Next and previous error
+
+(evil-ex-define-cmd "[cn]ext" 'next-error)
+(evil-ex-define-cmd "[c]prev" 'previous-error)
+
+;;; Make
+
+(evil-ex-define-cmd "make" 'compile)
+
+;;; ZZ
+
+(define-key evil-normal-state-map "ZZ" 'evil-save-and-close)
+
;; The following will create a minor mode foo-mode with Normal
;; state bindings for the keys w and e:
;; (define-minor-mode foo-mode
@@ -96,4 +109,3 @@
;;
;; Define a command with command properties keyword-args.
;; (evil-define-command command (args. . .) doc keyword-args. . . body. . .)
-
View
12 init.el
@@ -285,7 +285,17 @@
(autoload 'ack-find-same-file "full-ack" nil t)
(autoload 'ack-find-file "full-ack" nil t)
+;; Make C-x k kill buffer w/o prompt if emacsclient
+(add-hook 'server-switch-hook
+ (lambda ()
+ (when (current-local-map)
+ (use-local-map (copy-keymap (current-local-map))))
+ (when server-buffer-clients
+ (local-set-key (kbd "C-x k") 'server-edit))))
+
+;; Rebind C-x C-b so it doesn't list buffers in other window.
+(global-set-key (kbd "C-x C-b") 'buffer-menu)
+
;; keep customizations in another file
(setq custom-file "~/.emacs.d/.emacs-custom.el")
(load custom-file 'noerror)
-
Please sign in to comment.
Something went wrong with that request. Please try again.