From 3e5d6e81072b11c6d7a719cb3f3e484dc61d4c7e Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 17 Nov 2016 10:45:26 +0100 Subject: emacs: added evil-args and php-mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I've also added a key binding for killing Emacs. Signed-off-by: Miquel Sabaté Solà --- emacs/init.el | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'emacs/init.el') diff --git a/emacs/init.el b/emacs/init.el index f3dc9a7..e4d5214 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -224,6 +224,10 @@ Idea taken from @purcell." (float-time (time-subtract after-init-time before-init-time)))) (message "%.3fs" init-time))) +; Kill Emacs. Sometimes useful when you have a server-client setup and you want +; to *really* evaluate everything from scratch. +(global-set-key (kbd "C-c k") 'kill-emacs) + ;;; My lisp directory (add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory)) @@ -458,6 +462,21 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." :config (global-evil-surround-mode 1)) + (use-package evil-args + :ensure t + :config + ; Configuration taken from the documentation of evil-args. + + ;; Bind evil-args text objects + (define-key evil-inner-text-objects-map "a" 'evil-inner-arg) + (define-key evil-outer-text-objects-map "a" 'evil-outer-arg) + + ;; Bind evil-forward/backward-args + (define-key evil-normal-state-map "L" 'evil-forward-arg) + (define-key evil-normal-state-map "H" 'evil-backward-arg) + (define-key evil-motion-state-map "L" 'evil-forward-arg) + (define-key evil-motion-state-map "H" 'evil-backward-arg)) + (use-package evil-numbers :ensure t :config @@ -815,8 +834,6 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (defun mssola-go-mode () "My configuration for Go mode." - (require 'go-mode-autoloads) - ; Use goimports instead of go-fmt (setq gofmt-command "goimports") @@ -953,5 +970,8 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (use-package salt-mode :ensure t) +(use-package php-mode + :ensure t) + (provide 'init) ;;; init.el ends here -- cgit v1.2.3