Change namespace to evil-collection
This commit is contained in:
parent
4992d5fb0f
commit
9eb7d3db0d
|
@ -1,4 +1,4 @@
|
|||
;;; evil-ag.el --- Evil Bindings for Ag -*- lexical-binding: t -*-
|
||||
;;; evil-collection-ag.el --- Evil Bindings for Ag -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'ag nil t)
|
||||
(require 'evil)
|
||||
|
||||
(defun evil-ag-setup ()
|
||||
(defun evil-collection-ag-setup ()
|
||||
"Set up `evil' bindings for `ag'."
|
||||
(evil-define-key 'normal ag-mode-map
|
||||
"k" 'evil-previous-line
|
||||
|
@ -54,5 +54,5 @@
|
|||
;; https://github.com/mhayashi1120/Emacs-wgrep
|
||||
(evil-set-initial-state 'ag-mode 'normal))
|
||||
|
||||
(provide 'evil-ag)
|
||||
;;; evil-ag.el ends here
|
||||
(provide 'evil-collection-ag)
|
||||
;;; evil-collection-ag.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-alchemist.el --- Bindings for `alchemist'. -*- lexical-binding: t -*-
|
||||
;;; evil-collection-alchemist.el --- Bindings for `alchemist'. -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'evil)
|
||||
(require 'alchemist nil t)
|
||||
|
||||
(defun evil-alchemist-setup ()
|
||||
(defun evil-collection-alchemist-setup ()
|
||||
"Set up `evil' bindings for `alchemist'."
|
||||
(evil-set-initial-state 'alchemist-compile-mode 'normal)
|
||||
(evil-set-initial-state 'alchemist-eval-mode 'normal)
|
||||
|
@ -98,5 +98,5 @@
|
|||
(kbd "C-j") 'alchemist-goto-jump-to-next-def-symbol
|
||||
(kbd "C-k") 'alchemist-goto-jump-to-previous-def-symbol))
|
||||
|
||||
(provide 'evil-alchemist)
|
||||
;;; evil-alchemist.el ends here
|
||||
(provide 'evil-collection-alchemist)
|
||||
;;; evil-collection-alchemist.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-anaconda-mode.el --- Bindings for `anaconda-mode'. -*- lexical-binding: t -*-
|
||||
;;; evil-collection-anaconda-mode.el --- Bindings for `anaconda-mode'. -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
|||
(require 'anaconda-mode nil t)
|
||||
(require 'evil)
|
||||
|
||||
(defun evil-anaconda-mode-setup ()
|
||||
(defun evil-collection-anaconda-mode-setup ()
|
||||
"Set up `evil' bindings for `anaconda-mode'."
|
||||
;; Bindings don't seem to be set the first time.
|
||||
(add-hook 'anaconda-mode-hook #'evil-normalize-keymaps)
|
||||
|
@ -52,5 +52,5 @@
|
|||
"K" 'anaconda-mode-show-doc
|
||||
"gf" 'anaconda-mode-find-file))
|
||||
|
||||
(provide 'evil-anaconda-mode)
|
||||
;;; evil-anaconda-mode.el ends here
|
||||
(provide 'evil-collection-anaconda-mode)
|
||||
;;; evil-collection-anaconda-mode.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-arc-mode.el --- Evil bindings for arc-mode. -*- lexical-binding: t -*-
|
||||
;;; evil-collection-arc-mode.el --- Evil bindings for arc-mode. -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'arc-mode)
|
||||
(require 'evil)
|
||||
|
||||
(defun evil-arc-mode-setup ()
|
||||
(defun evil-collection-arc-mode-setup ()
|
||||
"Set up `evil' bindings for `arc-mode'."
|
||||
(evil-set-initial-state 'arc-mode 'motion)
|
||||
(evil-set-initial-state 'archive-mode 'motion)
|
||||
|
@ -70,5 +70,5 @@
|
|||
;; quit
|
||||
"q" 'quit-window))
|
||||
|
||||
(provide 'evil-arc-mode)
|
||||
;;; evil-arc-mode.el ends here
|
||||
(provide 'evil-collection-arc-mode)
|
||||
;;; evil-collection-arc-mode.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-bookmark.el --- Evil bindings for bookmarks -*- lexical-binding: t -*-
|
||||
;;; evil-collection-bookmark.el --- Evil bindings for bookmarks -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
|||
;;; Code:
|
||||
(require 'bookmark)
|
||||
|
||||
(defun evil-bookmark-setup ()
|
||||
(defun evil-collection-bookmark-setup ()
|
||||
"Set up `evil' bindings for `bookmark'."
|
||||
(evil-set-initial-state 'bookmark-bmenu-mode 'normal)
|
||||
|
||||
|
@ -69,5 +69,5 @@
|
|||
(kbd "M-<return>") 'bookmark-bmenu-switch-other-window))
|
||||
|
||||
|
||||
(provide 'evil-bookmark)
|
||||
;;; evil-bookmark.el ends here
|
||||
(provide 'evil-collection-bookmark)
|
||||
;;; evil-collection-bookmark.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-calendar.el --- Evil bindings for calendar -*- lexical-binding: t -*-
|
||||
;;; evil-collection-calendar.el --- Evil bindings for calendar -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'calendar)
|
||||
(require 'evil)
|
||||
|
||||
(defun evil-calendar-setup ()
|
||||
(defun evil-collection-calendar-setup ()
|
||||
"Set up `evil' bindings for `calendar'."
|
||||
(evil-define-key 'motion calendar-mode-map
|
||||
;; motion
|
||||
|
@ -97,5 +97,5 @@
|
|||
"ZQ" 'evil-quit
|
||||
"ZZ" 'calendar-exit))
|
||||
|
||||
(provide 'evil-calendar)
|
||||
;;; evil-calendar.el ends here
|
||||
(provide 'evil-collection-calendar)
|
||||
;;; evil-collection-calendar.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-cider.el --- Evil bindings for Cider -*- lexical-binding: t -*-
|
||||
;;; evil-collection-cider.el --- Evil bindings for Cider -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'cider nil t)
|
||||
(require 'evil-collection-util)
|
||||
|
||||
(defun evil-cider-last-sexp (command &rest args)
|
||||
(defun evil-collection-cider-last-sexp (command &rest args)
|
||||
"In normal-state or motion-state, last sexp ends at point."
|
||||
(if (and (not evil-move-beyond-eol)
|
||||
(or (evil-normal-state-p) (evil-motion-state-p)))
|
||||
|
@ -39,14 +39,14 @@
|
|||
(apply command args))
|
||||
(apply command args)))
|
||||
|
||||
(defun evil-cider-setup ()
|
||||
(defun evil-collection-cider-setup ()
|
||||
"Set up `evil' bindings for `cider'."
|
||||
(unless evil-move-beyond-eol
|
||||
(advice-add 'cider-eval-last-sexp :around 'evil-cider-last-sexp)
|
||||
(advice-add 'cider-eval-last-sexp-and-replace :around 'evil-cider-last-sexp)
|
||||
(advice-add 'cider-eval-last-sexp-to-repl :around 'evil-cider-last-sexp)
|
||||
(advice-add 'cider-eval-last-sexp :around 'evil-collection-cider-last-sexp)
|
||||
(advice-add 'cider-eval-last-sexp-and-replace :around 'evil-collection-cider-last-sexp)
|
||||
(advice-add 'cider-eval-last-sexp-to-repl :around 'evil-collection-cider-last-sexp)
|
||||
(with-eval-after-load 'cider-eval-sexp-fu
|
||||
(advice-add 'cider-esf--bounds-of-last-sexp :around 'evil-cider-last-sexp)))
|
||||
(advice-add 'cider-esf--bounds-of-last-sexp :around 'evil-collection-cider-last-sexp)))
|
||||
|
||||
(evil-define-key '(normal visual) cider-mode-map
|
||||
"gd" 'cider-find-var
|
||||
|
@ -108,5 +108,5 @@
|
|||
(kbd "<return>") 'cider-connections-goto-connection
|
||||
"g?" 'describe-mode)))
|
||||
|
||||
(provide 'evil-cider)
|
||||
;;; evil-cider.el ends here
|
||||
(provide 'evil-collection-cider)
|
||||
;;; evil-collection-cider.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-comint.el --- Bindings for `comint-mode'. -*- lexical-binding: t -*-
|
||||
;;; evil-collection-comint.el --- Bindings for `comint-mode'. -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'comint)
|
||||
(require 'evil)
|
||||
|
||||
(defun evil-comint-setup ()
|
||||
(defun evil-collection-comint-setup ()
|
||||
"Set up `evil' bindings for `comint'."
|
||||
(when evil-want-C-d-scroll
|
||||
(evil-define-key 'normal comint-mode-map
|
||||
|
@ -48,5 +48,5 @@
|
|||
(kbd "<up>") #'comint-previous-input
|
||||
(kbd "<down>") #'comint-next-input))
|
||||
|
||||
(provide 'evil-comint)
|
||||
;;; evil-comint.el ends here
|
||||
(provide 'evil-collection-comint)
|
||||
;;; evil-collection-comint.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-company.el --- Bindings for `company-mode'. -*- lexical-binding: t -*-
|
||||
;;; evil-collection-company.el --- Bindings for `company-mode'. -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,11 +30,11 @@
|
|||
(require 'company nil t)
|
||||
(require 'evil)
|
||||
|
||||
(defgroup evil-company nil
|
||||
(defgroup evil-collection-company nil
|
||||
"Evil bindings for `company-mode'."
|
||||
:group 'evil-collection)
|
||||
|
||||
(defcustom evil-company-use-tng t
|
||||
(defcustom evil-collection-company-use-tng t
|
||||
"Enable company-tng through `company-tng-configure-default'.
|
||||
|
||||
This mirrors ycmd's behavior for a completion experience more
|
||||
|
@ -42,13 +42,13 @@ similar to YouCompleteMe.
|
|||
|
||||
Note that for changes to take effect, this variable may have to
|
||||
be set through custom or before evil-collection loads."
|
||||
:group 'evil-company
|
||||
:group 'evil-collection-company
|
||||
:type 'boolean)
|
||||
|
||||
(defvar company-active-map)
|
||||
(defvar company-search-map)
|
||||
|
||||
(defun evil-company-setup ()
|
||||
(defun evil-collection-company-setup ()
|
||||
"Set up `evil' bindings for `company'."
|
||||
(define-key company-active-map (kbd "C-n") 'company-select-next-or-abort)
|
||||
(define-key company-active-map (kbd "C-p") 'company-select-previous-or-abort)
|
||||
|
@ -69,8 +69,8 @@ be set through custom or before evil-collection loads."
|
|||
(define-key company-search-map (kbd "M-k") 'company-select-previous)
|
||||
|
||||
;; Sets up YCMD like behavior.
|
||||
(when evil-company-use-tng
|
||||
(when evil-collection-company-use-tng
|
||||
(with-no-warnings (company-tng-configure-default))))
|
||||
|
||||
(provide 'evil-company)
|
||||
;;; evil-company.el ends here
|
||||
(provide 'evil-collection-company)
|
||||
;;; evil-collection-company.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-compile.el --- Evil bindings for `compile' -*- lexical-binding: t -*-
|
||||
;;; evil-collection-compile.el --- Evil bindings for `compile' -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'evil-collection-util)
|
||||
(require 'compile)
|
||||
|
||||
(defun evil-compile-setup ()
|
||||
(defun evil-collection-compile-setup ()
|
||||
"Set up `evil' bindings for `compile'."
|
||||
(evil-set-initial-state 'compilation-mode 'normal)
|
||||
|
||||
|
@ -54,5 +54,5 @@
|
|||
"]" 'compilation-next-file
|
||||
"gr" 'recompile))
|
||||
|
||||
(provide 'evil-compile)
|
||||
;;; evil-compile.el ends here
|
||||
(provide 'evil-collection-compile)
|
||||
;;; evil-collection-compile.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-cus-theme.el --- Bindings for `cus-theme'. -*- lexical-binding: t -*-
|
||||
;;; evil-collection-cus-theme.el --- Bindings for `cus-theme'. -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'cus-theme)
|
||||
(require 'evil)
|
||||
|
||||
(defun evil-cus-theme-setup ()
|
||||
(defun evil-collection-cus-theme-setup ()
|
||||
"Set up `evil' bindings for `cus-theme'."
|
||||
(evil-set-initial-state 'custom-new-theme-mode 'normal)
|
||||
(evil-set-initial-state 'custom-theme-choose-mode 'normal)
|
||||
|
@ -57,5 +57,5 @@
|
|||
"ZQ" 'evil-quit
|
||||
"ZZ" 'Custom-buffer-done))
|
||||
|
||||
(provide 'evil-cus-theme)
|
||||
;;; evil-cus-theme.el ends here
|
||||
(provide 'evil-collection-cus-theme)
|
||||
;;; evil-collection-cus-theme.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-custom.el --- Evil bindings for Customize -*- lexical-binding: t -*-
|
||||
;;; evil-collection-custom.el --- Evil bindings for Customize -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'cus-edit)
|
||||
(require 'evil)
|
||||
|
||||
(defun evil-custom-setup ()
|
||||
(defun evil-collection-custom-setup ()
|
||||
"Set up `evil' bindings for `Custom-mode'."
|
||||
(evil-set-initial-state 'Custom-mode 'normal)
|
||||
|
||||
|
@ -61,5 +61,5 @@
|
|||
"ZQ" 'evil-quit
|
||||
"ZZ" 'Custom-buffer-done))
|
||||
|
||||
(provide 'evil-custom)
|
||||
;;; evil-custom.el ends here
|
||||
(provide 'evil-collection-custom)
|
||||
;;; evil-collection-custom.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-debbugs.el --- Evil bindings for debbugs -*- lexical-binding: t -*-
|
||||
;;; evil-collection-debbugs.el --- Evil bindings for debbugs -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'debbugs nil t)
|
||||
(require 'evil)
|
||||
|
||||
(defun evil-debbugs-mode-setup ()
|
||||
(defun evil-collection-debbugs-mode-setup ()
|
||||
"Set up `evil' bindings for `debbugs-gnu-mode'."
|
||||
(evil-set-initial-state 'debbugs-gnu-mode 'motion)
|
||||
|
||||
|
@ -69,5 +69,5 @@
|
|||
"ZQ" 'quit-window
|
||||
"ZZ" 'quit-window))
|
||||
|
||||
(provide 'evil-debbugs)
|
||||
;;; evil-debbugs.el ends here
|
||||
(provide 'evil-collection-debbugs)
|
||||
;;; evil-collection-debbugs.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-debug.el --- Evil bindings for the debugger -*- lexical-binding: t -*-
|
||||
;;; evil-collection-debug.el --- Evil bindings for the debugger -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
|||
(require 'evil)
|
||||
(require 'debug)
|
||||
|
||||
(defun evil-debug-setup ()
|
||||
(defun evil-collection-debug-setup ()
|
||||
"Set up `evil' bindings for `debug'."
|
||||
(evil-set-initial-state 'debugger-mode 'motion)
|
||||
|
||||
|
@ -59,5 +59,5 @@
|
|||
"ZQ" 'evil-quit
|
||||
"ZZ" 'top-level))
|
||||
|
||||
(provide 'evil-debug)
|
||||
;;; evil-debug.el ends here
|
||||
(provide 'evil-collection-debug)
|
||||
;;; evil-collection-debug.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-diff-mode.el --- Add Evil bindings to diff-mode -*- lexical-binding: t -*-
|
||||
;;; evil-collection-diff-mode.el --- Add Evil bindings to diff-mode -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -25,20 +25,20 @@
|
|||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; Evil-Diff re-uses the read-only particularity of `diff-mode':
|
||||
;; Evil-Collection-Diff re-uses the read-only particularity of `diff-mode':
|
||||
;; When the buffer is read-only, enter motion state
|
||||
;; and manipulate the diffs with simple bindings.
|
||||
;; When the buffer is writage, use normal/insert states with some Evil-specific
|
||||
;; keys to ease navigation.
|
||||
;;
|
||||
;; See also `evil-diff-toggle-setup'.
|
||||
;; See also `evil-collection-diff-toggle-setup'.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'evil)
|
||||
(require 'diff-mode)
|
||||
|
||||
(defun evil-diff-read-only-state-switch ()
|
||||
(defun evil-collection-diff-read-only-state-switch ()
|
||||
"Make read-only in motion state, writable in normal state."
|
||||
(if buffer-read-only
|
||||
(progn
|
||||
|
@ -47,7 +47,7 @@
|
|||
(evil-normal-state)
|
||||
(message "Evil Diff: enter normal state")))
|
||||
|
||||
(defun evil-diff-toggle-setup ()
|
||||
(defun evil-collection-diff-toggle-setup ()
|
||||
"Toggle visiting diff buffers in motion state."
|
||||
(interactive)
|
||||
(when (eq major-mode 'diff-mode)
|
||||
|
@ -57,7 +57,7 @@
|
|||
(read-only-mode))))
|
||||
|
||||
;;; TODO: Report toggle function upstream?
|
||||
(defun evil-diff-toggle-context-unified (start end)
|
||||
(defun evil-collection-diff-toggle-context-unified (start end)
|
||||
"Toggle between context and unified views.
|
||||
|
||||
START and END are either taken from the region (if a prefix arg is given) or
|
||||
|
@ -73,7 +73,7 @@ else cover the whole buffer."
|
|||
(diff-context->unified start end))))
|
||||
|
||||
;;; TODO: Report toggle function upstream?
|
||||
(defun evil-diff-toggle-restrict-view (&optional arg)
|
||||
(defun evil-collection-diff-toggle-restrict-view (&optional arg)
|
||||
"Toggle the restriction of the view to the current hunk.
|
||||
When restricting and if the prefix ARG is given, restrict the view to the
|
||||
current file instead."
|
||||
|
@ -82,7 +82,7 @@ current file instead."
|
|||
(widen)
|
||||
(diff-restrict-view arg)))
|
||||
|
||||
(defun evil-diff-mode-setup ()
|
||||
(defun evil-collection-diff-mode-setup ()
|
||||
"Set up `evil' bindings for `diff-mode'."
|
||||
|
||||
(evil-set-initial-state 'diff-mode 'motion)
|
||||
|
@ -125,18 +125,18 @@ current file instead."
|
|||
"~" 'diff-reverse-direction
|
||||
"s" 'diff-split-hunk
|
||||
"c" 'diff-test-hunk
|
||||
"x" 'evil-diff-toggle-context-unified
|
||||
"x" 'evil-collection-diff-toggle-context-unified
|
||||
"#" 'diff-ignore-whitespace-hunk
|
||||
|
||||
"\\" 'read-only-mode)) ; magit has "\"
|
||||
|
||||
|
||||
|
||||
(add-hook 'diff-mode-hook 'evil-diff-toggle-setup)
|
||||
(add-hook 'diff-mode-hook 'evil-collection-diff-toggle-setup)
|
||||
|
||||
(defun evil-diff-unload-function ()
|
||||
(defun evil-collection-diff-unload-function ()
|
||||
"For `unload-feature'."
|
||||
(remove-hook 'diff-mode-hook 'evil-diff-toggle-setup))
|
||||
(remove-hook 'diff-mode-hook 'evil-collection-diff-toggle-setup))
|
||||
|
||||
(provide 'evil-diff-mode)
|
||||
;;; evil-diff-mode.el ends here
|
||||
(provide 'evil-collection-diff-mode)
|
||||
;;; evil-collection-diff-mode.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-dired.el --- Evil bindings for Dired -*- lexical-binding: t -*-
|
||||
;;; evil-collection-dired.el --- Evil bindings for Dired -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'dired)
|
||||
(require 'evil-collection-util)
|
||||
|
||||
(defun evil-dired-setup ()
|
||||
(defun evil-collection-dired-setup ()
|
||||
"Set up `evil' bindings for `dired'."
|
||||
(evil-define-key 'normal dired-mode-map
|
||||
"g" nil
|
||||
|
@ -188,5 +188,5 @@
|
|||
";s" 'epa-dired-do-sign
|
||||
";e" 'epa-dired-do-encrypt))
|
||||
|
||||
(provide 'evil-dired)
|
||||
;;; evil-dired.el ends here
|
||||
(provide 'evil-collection-dired)
|
||||
;;; evil-collection-dired.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-doc-view.el --- Evil bindings for docview. -*- lexical-binding: t -*-
|
||||
;;; evil-collection-doc-view.el --- Evil bindings for docview. -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'evil)
|
||||
(require 'doc-view)
|
||||
|
||||
(defun evil-doc-view-setup ()
|
||||
(defun evil-collection-doc-view-setup ()
|
||||
"Set up `evil' bindings for `doc-view'."
|
||||
(evil-set-initial-state 'doc-view-mode 'motion)
|
||||
(evil-define-key 'motion doc-view-mode-map
|
||||
|
@ -76,5 +76,5 @@
|
|||
(evil-define-key 'motion doc-view-mode-map
|
||||
(kbd "C-u") 'backward-page)))
|
||||
|
||||
(provide 'evil-doc-view)
|
||||
;;; evil-doc-view.el ends here
|
||||
(provide 'evil-collection-doc-view)
|
||||
;;; evil-collection-doc-view.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-edebug.el --- Evil bindings for Edebug -*- lexical-binding: t -*-
|
||||
;;; evil-collection-edebug.el --- Evil bindings for Edebug -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
(evil-collection-util-set-initial-state edebug-mode motion)
|
||||
|
||||
(defun evil-edebug-setup ()
|
||||
(defun evil-collection-edebug-setup ()
|
||||
"Set up `evil' bindings for `edebug'."
|
||||
(evil-define-key 'motion edebug-mode-map
|
||||
;; control
|
||||
|
@ -107,5 +107,5 @@
|
|||
"Q" 'edebug-x-clear-data
|
||||
"q" 'quit-window)))
|
||||
|
||||
(provide 'evil-edebug)
|
||||
;;; evil-edebug.el ends here
|
||||
(provide 'evil-collection-edebug)
|
||||
;;; evil-collection-edebug.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-elfeed.el --- Evil bindings for elfeed -*- lexical-binding: t -*-
|
||||
;;; evil-collection-elfeed.el --- Evil bindings for elfeed -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'elfeed nil t)
|
||||
(require 'evil)
|
||||
|
||||
(defun evil-elfeed-setup ()
|
||||
(defun evil-collection-elfeed-setup ()
|
||||
"Set up `evil' bindings for `elfeed'."
|
||||
(evil-set-initial-state 'elfeed-search-mode 'motion)
|
||||
|
||||
|
@ -93,5 +93,5 @@
|
|||
"ZQ" 'elfeed-kill-buffer
|
||||
"ZZ" 'elfeed-kill-buffer))
|
||||
|
||||
(provide 'evil-elfeed)
|
||||
;;; evil-elfeed.el ends here
|
||||
(provide 'evil-collection-elfeed)
|
||||
;;; evil-collection-elfeed.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-elisp-mode.el --- Bindings for `elisp-mode'. -*- lexical-binding: t -*-
|
||||
;;; evil-collection-elisp-mode.el --- Bindings for `elisp-mode'. -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,14 +30,14 @@
|
|||
(require 'elisp-mode)
|
||||
(require 'evil)
|
||||
|
||||
(defun evil-elisp-mode-last-sexp-setup-props (beg end value alt1 alt2)
|
||||
(defun evil-collection-elisp-mode-last-sexp-setup-props (beg end value alt1 alt2)
|
||||
"Set up text properties for the output of `elisp--eval-last-sexp'.
|
||||
BEG and END are the start and end of the output in current-buffer.
|
||||
VALUE is the Lisp value printed, ALT1 and ALT2 are strings for the
|
||||
alternative printed representations that can be displayed."
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map (kbd "C-m")
|
||||
'evil-elisp-mode-return-or-last-sexp-toggle-display)
|
||||
'evil-collection-elisp-mode-return-or-last-sexp-toggle-display)
|
||||
(define-key map [down-mouse-2] 'mouse-set-point)
|
||||
(define-key map [mouse-2] 'elisp-last-sexp-toggle-display)
|
||||
(add-text-properties
|
||||
|
@ -49,7 +49,7 @@ alternative printed representations that can be displayed."
|
|||
rear-nonsticky (mouse-face keymap help-echo
|
||||
printed-value)))))
|
||||
|
||||
(defun evil-elisp-mode-return-or-last-sexp-toggle-display ()
|
||||
(defun evil-collection-elisp-mode-return-or-last-sexp-toggle-display ()
|
||||
"Trigger RET or call `elisp-last-sexp-toggle-display'."
|
||||
(interactive)
|
||||
(if (eq evil-state 'insert)
|
||||
|
@ -57,7 +57,7 @@ alternative printed representations that can be displayed."
|
|||
(lookup-key (current-global-map) (kbd "C-m")))
|
||||
(call-interactively 'elisp-last-sexp-toggle-display)))
|
||||
|
||||
(defun evil-elisp-mode-last-sexp (command &rest args)
|
||||
(defun evil-collection-elisp-mode-last-sexp (command &rest args)
|
||||
"In normal-state or motion-state, last sexp ends at point."
|
||||
(if (and (not evil-move-beyond-eol)
|
||||
(or (evil-normal-state-p) (evil-motion-state-p)))
|
||||
|
@ -66,12 +66,12 @@ alternative printed representations that can be displayed."
|
|||
(apply command args))
|
||||
(apply command args)))
|
||||
|
||||
(defun evil-elisp-mode-setup ()
|
||||
(defun evil-collection-elisp-mode-setup ()
|
||||
"Set up `evil' bindings for `elisp-mode'."
|
||||
(unless evil-move-beyond-eol
|
||||
(advice-add 'eval-print-last-sexp :around 'evil-elisp-mode-last-sexp))
|
||||
(advice-add 'last-sexp-setup-props
|
||||
:override 'evil-elisp-mode-last-sexp-setup-props))
|
||||
:override 'evil-collection-elisp-mode-last-sexp-setup-props))
|
||||
|
||||
(provide 'evil-elisp-mode)
|
||||
;;; evil-elisp-mode.el ends here
|
||||
(provide 'evil-collection-elisp-mode)
|
||||
;;; evil-collection-elisp-mode.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-elisp-refs.el --- Evil bindings for Elisp Refs -*- lexical-binding: t -*-
|
||||
;;; evil-collection-elisp-refs.el --- Evil bindings for Elisp Refs -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
|||
(require 'evil-collection-util)
|
||||
(require 'elisp-refs nil t)
|
||||
|
||||
(defun evil-elisp-refs-setup ()
|
||||
(defun evil-collection-elisp-refs-setup ()
|
||||
"Set up `evil' bindings for `elisp-refs'."
|
||||
(evil-define-key 'normal elisp-refs-mode-map
|
||||
(kbd "<tab>") 'elisp-refs-next-match
|
||||
|
@ -45,5 +45,5 @@
|
|||
;; quit
|
||||
"q" 'kill-this-buffer))
|
||||
|
||||
(provide 'evil-elisp-refs)
|
||||
;;; evil-elisp-refs.el ends here
|
||||
(provide 'evil-collection-elisp-refs)
|
||||
;;; evil-collection-elisp-refs.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-emms.el --- Evil bindings for EMMS -*- lexical-binding: t -*-
|
||||
;;; evil-collection-emms.el --- Evil bindings for EMMS -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -44,24 +44,24 @@
|
|||
|
||||
;;; emms-browser does not run any mode hook. As such the default state is 'normal.
|
||||
;;; TODO: Report upstream.
|
||||
(defun evil-emms-browser ()
|
||||
(defun evil-collection-emms-browser ()
|
||||
"Default `emms-browser' to motion state."
|
||||
(evil-motion-state))
|
||||
|
||||
(with-no-warnings
|
||||
(defun evil-emms-playlist-mode-insert-newline-above ()
|
||||
(defun evil-collection-emms-playlist-mode-insert-newline-above ()
|
||||
"Insert a newline above point."
|
||||
(interactive)
|
||||
(emms-with-inhibit-read-only-t
|
||||
(evil-insert-newline-above)))
|
||||
|
||||
(defun evil-emms-playlist-mode-insert-newline-below ()
|
||||
(defun evil-collection-emms-playlist-mode-insert-newline-below ()
|
||||
"Insert a newline below point."
|
||||
(interactive)
|
||||
(emms-with-inhibit-read-only-t
|
||||
(evil-insert-newline-below)))
|
||||
|
||||
(defun evil-emms-playlist-mode-paste-before ()
|
||||
(defun evil-collection-emms-playlist-mode-paste-before ()
|
||||
"Pastes the latest yanked playlist items before the cursor position.
|
||||
The return value is the yanked text."
|
||||
(interactive)
|
||||
|
@ -72,14 +72,14 @@
|
|||
(evil-previous-line)
|
||||
(evil-beginning-of-line)))
|
||||
|
||||
(defun evil-emms-playlist-mode-paste-after ()
|
||||
(defun evil-collection-emms-playlist-mode-paste-after ()
|
||||
"Pastes the latest yanked playlist items behind point.
|
||||
The return value is the yanked text."
|
||||
(interactive)
|
||||
(evil-next-line)
|
||||
(evil-emms-playlist-mode-paste-before)))
|
||||
|
||||
(defun evil-emms-setup ()
|
||||
(defun evil-collection-emms-setup ()
|
||||
"Set up `evil' bindings for `emms'."
|
||||
(advice-add 'emms-browser :after 'evil-emms-browser)
|
||||
(evil-set-initial-state 'emms-playlist-mode 'motion)
|
||||
|
@ -161,10 +161,10 @@
|
|||
|
||||
"D" 'emms-playlist-mode-kill-track ; emms-browser uses "D"
|
||||
"C" 'emms-playlist-mode-clear
|
||||
"O" 'evil-emms-playlist-mode-insert-newline-above
|
||||
"o" 'evil-emms-playlist-mode-insert-newline-below
|
||||
"P" 'evil-emms-playlist-mode-paste-before
|
||||
"p" 'evil-emms-playlist-mode-paste-after
|
||||
"O" 'evil-collection-evil-emms-playlist-mode-insert-newline-above
|
||||
"o" 'evil-collection-emms-playlist-mode-insert-newline-below
|
||||
"P" 'evil-collection-emms-playlist-mode-paste-before
|
||||
"p" 'evil-collection-emms-playlist-mode-paste-after
|
||||
|
||||
"u" 'emms-playlist-mode-undo
|
||||
|
||||
|
@ -189,5 +189,5 @@
|
|||
;; "d" 'emms-playlist-mode-kill
|
||||
"D" 'emms-playlist-mode-kill))
|
||||
|
||||
(provide 'evil-emms)
|
||||
;;; evil-emms.el ends here
|
||||
(provide 'evil-collection-emms)
|
||||
;;; evil-collection-emms.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-eshell.el --- Evil bindings for Eshell -*- lexical-binding: t -*-
|
||||
;;; evil-collection-eshell.el --- Evil bindings for Eshell -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -31,19 +31,19 @@
|
|||
(require 'eshell)
|
||||
(require 'evil)
|
||||
|
||||
(defun evil-eshell-next-prompt ()
|
||||
(defun evil-collection-eshell-next-prompt ()
|
||||
"`evil' wrapper around `eshell-next-prompt'."
|
||||
(when (get-text-property (point) 'read-only)
|
||||
;; If at end of prompt, `eshell-next-prompt' will not move, so go backward.
|
||||
(beginning-of-line)
|
||||
(eshell-next-prompt 1)))
|
||||
|
||||
(defun evil-eshell-next-prompt-on-insert ()
|
||||
(defun evil-collection-eshell-next-prompt-on-insert ()
|
||||
"Go to next prompt on `evil' replace/insert enter."
|
||||
(dolist (hook '(evil-replace-state-entry-hook evil-insert-state-entry-hook))
|
||||
(add-hook hook 'evil-eshell-next-prompt nil t)))
|
||||
|
||||
(defun evil-eshell-interrupt-process ()
|
||||
(defun evil-collection-eshell-interrupt-process ()
|
||||
"Interupt `eshell' process and enter insert state."
|
||||
(interactive)
|
||||
(eshell-interrupt-process)
|
||||
|
@ -51,7 +51,7 @@
|
|||
|
||||
;;; `eshell-mode-map' is reset when Eshell is initialized in `eshell-mode'. We
|
||||
;;; need to add bindings to `eshell-first-time-mode-hook'.
|
||||
(defun evil-eshell-setup-keys ()
|
||||
(defun evil-collection-eshell-setup-keys ()
|
||||
"Set up `evil' bindings for `eshell'."
|
||||
(evil-define-key 'normal eshell-mode-map
|
||||
;; motion
|
||||
|
@ -67,7 +67,7 @@
|
|||
(kbd "M-l") 'eshell-forward-argument
|
||||
|
||||
(kbd "<return>") 'eshell-send-input
|
||||
(kbd "C-c C-c") 'evil-eshell-interrupt-process)
|
||||
(kbd "C-c C-c") 'evil-collection-eshell-interrupt-process)
|
||||
(evil-define-key 'insert eshell-mode-map
|
||||
;; motion
|
||||
(kbd "M-h") 'eshell-backward-argument
|
||||
|
@ -85,10 +85,10 @@
|
|||
"^" 'eshell-bol))
|
||||
|
||||
;; TODO: Compare this setup procedure with evil-ediff.
|
||||
(defun evil-eshell-setup ()
|
||||
(defun evil-collection-eshell-setup ()
|
||||
"Set up `evil' bindings for `eshell'."
|
||||
(add-hook 'eshell-mode-hook 'evil-eshell-next-prompt-on-insert)
|
||||
(add-hook 'eshell-first-time-mode-hook 'evil-eshell-setup-keys))
|
||||
(add-hook 'eshell-mode-hook 'evil-collection-eshell-next-prompt-on-insert)
|
||||
(add-hook 'eshell-first-time-mode-hook 'evil-collection-eshell-setup-keys))
|
||||
|
||||
(provide 'evil-eshell)
|
||||
;;; evil-eshell.el ends here
|
||||
(provide 'evil-collection-eshell)
|
||||
;;; evil-collection-eshell.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-eval-sexp-fu.el --- Bindings for `eval-sexp-fu'. -*- lexical-binding: t -*-
|
||||
;;; evil-collection-eval-sexp-fu.el --- Bindings for `eval-sexp-fu'. -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
|||
(with-no-warnings
|
||||
(require 'eval-sexp-fu nil t))
|
||||
|
||||
(defun evil-eval-sexp-fu-bounds-of-thing-at-point-sexp (command &rest args)
|
||||
(defun evil-collection-eval-sexp-fu-bounds-of-thing-at-point-sexp (command &rest args)
|
||||
"In normal-state or motion-state, last sexp ends at point."
|
||||
(if (and (eq (nth 0 args) 'sexp)
|
||||
(and (not evil-move-beyond-eol)
|
||||
|
@ -41,19 +41,19 @@
|
|||
(apply command args))
|
||||
(apply command args)))
|
||||
|
||||
(defun evil-eval-sexp-fu-advise-bounds-of-thing-at-point (command &rest args)
|
||||
(defun evil-collection-eval-sexp-fu-advise-bounds-of-thing-at-point (command &rest args)
|
||||
"Advise `bounds-of-thing-at-point' to handle `evil's `evil-move-beyond-eol'."
|
||||
(advice-add 'bounds-of-thing-at-point
|
||||
:around 'evil-eval-sexp-fu-bounds-of-thing-at-point-sexp)
|
||||
:around 'evil-collection-eval-sexp-fu-bounds-of-thing-at-point-sexp)
|
||||
(apply command args)
|
||||
(advice-remove 'bounds-of-thing-at-point
|
||||
'evil-eval-sexp-fu-bounds-of-thing-at-point-sexp))
|
||||
'evil-collection-eval-sexp-fu-bounds-of-thing-at-point-sexp))
|
||||
|
||||
(defun evil-eval-sexp-fu-setup ()
|
||||
(defun evil-collection-eval-sexp-fu-setup ()
|
||||
"Set up `evil' with `eval-sexp-fu'."
|
||||
(unless evil-move-beyond-eol
|
||||
(advice-add 'ad-Advice-eval-last-sexp
|
||||
:around 'evil-eval-sexp-fu-advise-bounds-of-thing-at-point)))
|
||||
:around 'evil-collection-eval-sexp-fu-advise-bounds-of-thing-at-point)))
|
||||
|
||||
(provide 'evil-eval-sexp-fu)
|
||||
;;; evil-eval-sexp-fu.el ends here
|
||||
(provide 'evil-collection-eval-sexp-fu)
|
||||
;;; evil-collection-eval-sexp-fu.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-flycheck.el --- Evil bindings for flycheck -*- lexical-binding: t -*-
|
||||
;;; evil-collection-flycheck.el --- Evil bindings for flycheck -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
(defvar flycheck-error-list-mode-map)
|
||||
|
||||
(defun evil-flycheck-setup ()
|
||||
(defun evil-collection-flycheck-setup ()
|
||||
"Set up `evil' bindings for `flycheck'."
|
||||
(evil-set-initial-state 'flycheck-error-list-mode 'normal)
|
||||
(evil-define-key 'normal flycheck-error-list-mode-map
|
||||
|
@ -49,5 +49,5 @@
|
|||
(kbd "<return>") 'flycheck-error-list-goto-error
|
||||
"q" 'quit-window))
|
||||
|
||||
(provide 'evil-flycheck)
|
||||
;;; evil-flycheck.el ends here
|
||||
(provide 'evil-collection-flycheck)
|
||||
;;; evil-collection-flycheck.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-geiser.el --- Bindings for `geiser'. -*- lexical-binding: t -*-
|
||||
;;; evil-collection-geiser.el --- Bindings for `geiser'. -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
|||
(defvar geiser-debug-mode-map)
|
||||
(defvar geiser-doc-mode-map)
|
||||
|
||||
(defun evil-geiser-last-sexp (command &rest args)
|
||||
(defun evil-collection-geiser-last-sexp (command &rest args)
|
||||
"In normal-state or motion-state, last sexp ends at point."
|
||||
(if (and (not evil-move-beyond-eol)
|
||||
(or (evil-normal-state-p) (evil-motion-state-p)))
|
||||
|
@ -42,11 +42,11 @@
|
|||
(apply command args))
|
||||
(apply command args)))
|
||||
|
||||
(defun evil-geiser-setup ()
|
||||
(defun evil-collection-geiser-setup ()
|
||||
"Set up bindings for `geiser'."
|
||||
(unless evil-move-beyond-eol
|
||||
(advice-add 'geiser-eval-last-sexp :around 'evil-geiser-last-sexp)
|
||||
(advice-add 'geiser-eval-last-sexp-and-print :around 'evil-geiser-last-sexp))
|
||||
(advice-add 'geiser-eval-last-sexp :around 'evil-collection-geiser-last-sexp)
|
||||
(advice-add 'geiser-eval-last-sexp-and-print :around 'evil-collection-geiser-last-sexp))
|
||||
|
||||
(evil-set-initial-state 'geiser-debug-mode 'normal)
|
||||
(evil-set-initial-state 'geiser-doc-mode 'normal)
|
||||
|
@ -86,5 +86,5 @@
|
|||
(kbd "gz") 'geiser-mode-switch-to-repl
|
||||
(kbd "K") 'geiser-doc-symbol-at-point))
|
||||
|
||||
(provide 'evil-geiser)
|
||||
;;; evil-geiser.el ends here
|
||||
(provide 'evil-collection-geiser)
|
||||
;;; evil-collection-geiser.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-ggtags.el --- Evil bindings for ggtags -*- lexical-binding: t -*-
|
||||
;;; evil-collection-ggtags.el --- Evil bindings for ggtags -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
|||
(defvar ggtags-view-tag-history-mode-map)
|
||||
(defvar ggtags-navigation-map)
|
||||
|
||||
(defun evil-ggtags-setup ()
|
||||
(defun evil-collection-ggtags-setup ()
|
||||
"Set up `evil' bindings for `ggtags'."
|
||||
(evil-set-initial-state 'ggtags-global-mode 'normal)
|
||||
(evil-set-initial-state 'ggtags-view-search-history-mode 'normal)
|
||||
|
@ -90,5 +90,5 @@
|
|||
"go" 'ggtags-navigation-visible-mode ;; FIXME: This can be anything.
|
||||
(kbd "<return>") 'ggtags-navigation-mode-done))
|
||||
|
||||
(provide 'evil-ggtags)
|
||||
;;; evil-ggtags.el ends here
|
||||
(provide 'evil-collection-ggtags)
|
||||
;;; evil-collection-ggtags.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-helm.el --- Evil bindings for Helm -*- lexical-binding: t -*-
|
||||
;;; evil-collection-helm.el --- Evil bindings for Helm -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
|||
(defvar helm-find-files-map)
|
||||
(defvar helm-read-file-map)
|
||||
|
||||
(defun evil-helm-setup ()
|
||||
(defun evil-collection-helm-setup ()
|
||||
"Set up `evil' bindings for `helm'."
|
||||
(evil-define-key '(insert normal) helm-map
|
||||
(kbd "M-[") 'helm-previous-source
|
||||
|
@ -77,5 +77,5 @@
|
|||
(kbd "C-f") 'helm-next-page
|
||||
(kbd "C-b") 'helm-previous-page))
|
||||
|
||||
(provide 'evil-helm)
|
||||
;;; evil-helm.el ends here
|
||||
(provide 'evil-collection-helm)
|
||||
;;; evil-collection-helm.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-help.el --- Evil bindings for help-mode -*- lexical-binding: t -*-
|
||||
;;; evil-collection-help.el --- Evil bindings for help-mode -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'evil)
|
||||
(require 'help-mode)
|
||||
|
||||
(defun evil-help-setup ()
|
||||
(defun evil-collection-help-setup ()
|
||||
"Set up `evil' bindings for `help'."
|
||||
(evil-set-initial-state 'help-mode 'normal)
|
||||
(evil-define-key 'normal help-mode-map
|
||||
|
@ -62,5 +62,5 @@
|
|||
"ZQ" 'evil-quit
|
||||
"ZZ" 'quit-window))
|
||||
|
||||
(provide 'evil-help)
|
||||
;;; evil-help.el ends here
|
||||
(provide 'evil-collection-help)
|
||||
;;; evil-collection-help.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-ibuffer.el --- Evil bindings for IBuffer -*- lexical-binding: t -*-
|
||||
;;; evil-collection-ibuffer.el --- Evil bindings for IBuffer -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'evil-collection-util)
|
||||
(require 'ibuffer)
|
||||
|
||||
(defun evil-ibuffer-setup ()
|
||||
(defun evil-collection-ibuffer-setup ()
|
||||
"Set up `evil' bindings for `ibuffer'."
|
||||
(evil-collection-util-evilify-map
|
||||
ibuffer-mode-map
|
||||
|
@ -50,5 +50,5 @@
|
|||
"gj" 'ibuffer-forward-filter-group
|
||||
"gk" 'ibuffer-backward-filter-group))
|
||||
|
||||
(provide 'evil-ibuffer)
|
||||
;;; evil-ibuffer.el ends here
|
||||
(provide 'evil-collection-ibuffer)
|
||||
;;; evil-collection-ibuffer.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-image+.el --- Evil bindings for image-mode with image+ -*- lexical-binding: t -*-
|
||||
;;; evil-collection-image+.el --- Evil bindings for image-mode with image+ -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'evil)
|
||||
(require 'image+ nil t)
|
||||
|
||||
(defun evil-image+-setup ()
|
||||
(defun evil-collection-image+-setup ()
|
||||
"Set up `evil' bindings for `image+'."
|
||||
(evil-define-key 'motion image-mode-map
|
||||
;; zoom
|
||||
|
@ -45,5 +45,5 @@
|
|||
"r" 'imagex-sticky-rotate-right
|
||||
"l" 'imagex-sticky-rotate-left))
|
||||
|
||||
(provide 'evil-image+)
|
||||
;;; evil-image+.el ends here
|
||||
(provide 'evil-collection-image+)
|
||||
;;; evil-collection-image+.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-image.el --- Evil bindings for Image -*- lexical-binding: t -*-
|
||||
;;; evil-collection-image.el --- Evil bindings for Image -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
|||
;; TODO: pdf and doc-view conflict with image.
|
||||
;; See https://github.com/jojojames/evil-collection/issues/23.
|
||||
|
||||
(defun evil-image-setup ()
|
||||
(defun evil-collection-image-setup ()
|
||||
"Set up `evil' bindings for `image-mode'."
|
||||
(evil-set-initial-state 'image-mode 'motion)
|
||||
|
||||
|
@ -86,5 +86,5 @@
|
|||
(evil-define-key 'motion image-mode-map
|
||||
(kbd "C-u") 'image-scroll-up)))
|
||||
|
||||
(provide 'evil-image)
|
||||
;;; evil-image.el ends here
|
||||
(provide 'evil-collection-image)
|
||||
;;; evil-collection-image.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-info.el --- Evil bindings for Info-mode -*- lexical-binding: t -*-
|
||||
;;; evil-collection-info.el --- Evil bindings for Info-mode -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
|||
(require 'evil)
|
||||
(require 'info)
|
||||
|
||||
(defun evil-info-setup ()
|
||||
(defun evil-collection-info-setup ()
|
||||
"Set up `evil' bindings for `info-mode'."
|
||||
(evil-define-key 'motion Info-mode-map
|
||||
;; motion: Restore some Evil keys that got overriden.
|
||||
|
@ -73,5 +73,5 @@
|
|||
"ZQ" 'evil-quit
|
||||
"ZZ" 'Info-exit))
|
||||
|
||||
(provide 'evil-info)
|
||||
;;; evil-info.el ends here
|
||||
(provide 'evil-collection-info)
|
||||
;;; evil-collection-info.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-ivy.el --- Evil bindings for ivy -*- lexical-binding: t -*-
|
||||
;;; evil-collection-ivy.el --- Evil bindings for ivy -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'evil)
|
||||
(require 'ivy nil t)
|
||||
|
||||
(defun evil-ivy-setup ()
|
||||
(defun evil-collection-ivy-setup ()
|
||||
"Set up `evil' bindings for `ivy-mode'."
|
||||
(evil-define-key 'normal ivy-occur-mode-map
|
||||
[mouse-1] 'ivy-occur-click
|
||||
|
@ -75,5 +75,5 @@
|
|||
;; quit
|
||||
(kbd "q") 'quit-window))
|
||||
|
||||
(provide 'evil-ivy)
|
||||
;;; evil-ivy.el ends here
|
||||
(provide 'evil-collection-ivy)
|
||||
;;; evil-collection-ivy.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-macrostep.el --- Evil Integration for Macrostep -*- lexical-binding: t -*-
|
||||
;;; evil-collection-macrostep.el --- Evil Integration for Macrostep -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'evil-collection-util)
|
||||
(require 'macrostep nil t)
|
||||
|
||||
(defun evil-macrostep-setup ()
|
||||
(defun evil-collection-macrostep-setup ()
|
||||
"Set up `evil' bindings for `macrostep'."
|
||||
;; Keymaps don't seem to be populated on first try.
|
||||
;; Force `evil' to normalize keymaps.
|
||||
|
@ -45,5 +45,5 @@
|
|||
(kbd "C-j") 'macrostep-next-macro
|
||||
(kbd "C-k") 'macrostep-prev-macro))
|
||||
|
||||
(provide 'evil-macrostep)
|
||||
;;; evil-macrostep.el ends here
|
||||
(provide 'evil-collection-macrostep)
|
||||
;;; evil-collection-macrostep.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-man.el --- Evil bindings for Man-mode -*- lexical-binding: t -*-
|
||||
;;; evil-collection-man.el --- Evil bindings for Man-mode -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'evil)
|
||||
(require 'man)
|
||||
|
||||
(defun evil-man-setup ()
|
||||
(defun evil-collection-man-setup ()
|
||||
"Set up `evil' bindings for `man'."
|
||||
(evil-define-key 'motion Man-mode-map
|
||||
;; motion
|
||||
|
@ -60,5 +60,5 @@
|
|||
"ZQ" 'evil-quit
|
||||
"ZZ" 'Man-quit))
|
||||
|
||||
(provide 'evil-man)
|
||||
;;; evil-man.el ends here
|
||||
(provide 'evil-collection-man)
|
||||
;;; evil-collection-man.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-minibuffer.el --- Evil bindings for the minibuffer -*- lexical-binding: t -*-
|
||||
;;; evil-collection-minibuffer.el --- Evil bindings for the minibuffer -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -29,12 +29,12 @@
|
|||
;;; Code:
|
||||
(require 'evil)
|
||||
|
||||
(defun evil-minibuffer-insert ()
|
||||
(defun evil-collection-minibuffer-insert ()
|
||||
"Switch to insert state.
|
||||
|
||||
This function is meant to be hooked in the minibuffer:
|
||||
|
||||
(add-hook 'minibuffer-setup-hook 'evil-minibuffer-insert)
|
||||
(add-hook 'minibuffer-setup-hook 'evil-collection-minibuffer-insert)
|
||||
|
||||
`evil-set-initial-state' can not be used for the minibuffer since
|
||||
it does not have a mode."
|
||||
|
@ -45,7 +45,7 @@ it does not have a mode."
|
|||
;; then it may conflict with other packages' if they do the same.
|
||||
(evil-insert 1))
|
||||
|
||||
(defun evil-minibuffer-init ()
|
||||
(defun evil-collection-minibuffer-init ()
|
||||
"Initialize minibuffer for `evil'."
|
||||
;; https://www.gnu.org/software/emacs/manual/html_node/elisp/Text-from-Minibuffer.html
|
||||
;; WARNING: With lexical binding, lambdas from `mapc' and `dolist' become
|
||||
|
@ -66,5 +66,5 @@ it does not have a mode."
|
|||
(evil-define-key 'normal evil-ex-completion-map (kbd "C-p") 'previous-history-element)
|
||||
(evil-define-key 'normal evil-ex-completion-map (kbd "C-n") 'next-history-element))
|
||||
|
||||
(provide 'evil-minibuffer)
|
||||
;;; evil-minibuffer.el ends here
|
||||
(provide 'evil-collection-minibuffer)
|
||||
;;; evil-collection-minibuffer.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-occur.el --- Evil bindings for occur -*- lexical-binding: t -*-
|
||||
;;; evil-collection-occur.el --- Evil bindings for occur -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
(when (> emacs-major-version 25)
|
||||
(require 'replace))
|
||||
|
||||
(defun evil-occur-setup ()
|
||||
(defun evil-collection-occur-setup ()
|
||||
"Set up `evil' bindings for `occur'."
|
||||
(evil-set-initial-state 'occur-mode 'normal)
|
||||
|
||||
|
@ -66,5 +66,5 @@
|
|||
(kbd "C-o") 'occur-mode-display-occurrence
|
||||
(kbd "C-c C-f") 'next-error-follow-minor-mode))
|
||||
|
||||
(provide 'evil-occur)
|
||||
;;; evil-occur.el ends here
|
||||
(provide 'evil-collection-occur)
|
||||
;;; evil-collection-occur.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-outline.el --- Evil bindings for outline-mode -*- lexical-binding: t -*-
|
||||
;;; evil-collection-outline.el --- Evil bindings for outline-mode -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'evil)
|
||||
(require 'outline)
|
||||
|
||||
(defun evil-outline-setup ()
|
||||
(defun evil-collection-outline-setup ()
|
||||
"Set up `evil' bindings for `outline'."
|
||||
(evil-define-key 'motion outline-mode-map
|
||||
;; folding
|
||||
|
@ -78,5 +78,5 @@
|
|||
|
||||
(kbd "M-<return>") 'outline-insert-heading)) ; Org-mode has "M-<return>"
|
||||
|
||||
(provide 'evil-outline)
|
||||
;;; evil-outline.el ends here
|
||||
(provide 'evil-collection-outline)
|
||||
;;; evil-collection-outline.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-p4.el --- Evil bindings for P4 -*- lexical-binding: t -*-
|
||||
;;; evil-collection-p4.el --- Evil bindings for P4 -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
|||
|
||||
(defvar p4-basic-mode-map)
|
||||
|
||||
(defun evil-p4-setup ()
|
||||
(defun evil-collection-p4-setup ()
|
||||
"Set up `evil' bindings for `p4'."
|
||||
(evil-set-initial-state 'p4-basic-mode 'normal)
|
||||
|
||||
|
@ -51,5 +51,5 @@
|
|||
"=" 'delete-other-windows))
|
||||
|
||||
;;; Code:
|
||||
(provide 'evil-p4)
|
||||
;;; evil-p4.el ends here
|
||||
(provide 'evil-collection-p4)
|
||||
;;; evil-collection-p4.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-package-menu.el --- Evil bindings for package-menu -*- lexical-binding: t -*-
|
||||
;;; evil-collection-package-menu.el --- Evil bindings for package-menu -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'evil)
|
||||
(require 'package)
|
||||
|
||||
(defun evil-package-menu-setup ()
|
||||
(defun evil-collection-package-menu-setup ()
|
||||
"Set up `evil' bindings for `package-menu'."
|
||||
(evil-set-initial-state 'package-menu-mode 'motion)
|
||||
|
||||
|
@ -49,5 +49,5 @@
|
|||
"ZQ" 'evil-quit
|
||||
"ZZ" 'quit-window))
|
||||
|
||||
(provide 'evil-package-menu)
|
||||
;;; evil-package-menu.el ends here
|
||||
(provide 'evil-collection-package-menu)
|
||||
;;; evil-collection-package-menu.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-pass.el --- Evil bindings for pass-mode -*- lexical-binding: t -*-
|
||||
;;; evil-collection-pass.el --- Evil bindings for pass-mode -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
(defvar pass-mode-map)
|
||||
|
||||
(defun evil-pass-setup ()
|
||||
(defun evil-collection-pass-setup ()
|
||||
"Set up `evil' bindings for `pass-mode'."
|
||||
(evil-define-key 'normal pass-mode-map
|
||||
"gj" 'pass-next-entry
|
||||
|
@ -53,5 +53,5 @@
|
|||
(kbd "RET") 'pass-view
|
||||
"q" 'pass-quit))
|
||||
|
||||
(provide 'evil-pass)
|
||||
;;; evil-pass.el ends here
|
||||
(provide 'evil-collection-pass)
|
||||
;;; evil-collection-pass.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-pdf.el --- Evil bindings for pdf-tools -*- lexical-binding: t -*-
|
||||
;;; evil-collection-pdf.el --- Evil bindings for pdf-tools -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -31,21 +31,21 @@
|
|||
(require 'pdf-view nil t)
|
||||
|
||||
(with-no-warnings
|
||||
(defun evil-pdf-view-goto-page (&optional page)
|
||||
(defun evil-collection-pdf-view-goto-page (&optional page)
|
||||
"`evil' wrapper around `pdf-view-last-page'."
|
||||
(interactive "P")
|
||||
(if page
|
||||
(pdf-view-goto-page page)
|
||||
(pdf-view-last-page)))
|
||||
|
||||
(defun evil-pdf-view-goto-first-page (&optional page)
|
||||
(defun evil-collection-pdf-view-goto-first-page (&optional page)
|
||||
"`evil' wrapper around `pdf-view-first-page'."
|
||||
(interactive "P")
|
||||
(if page
|
||||
(pdf-view-goto-page page)
|
||||
(pdf-view-first-page))))
|
||||
|
||||
(defun evil-pdf-setup ()
|
||||
(defun evil-collection-pdf-setup ()
|
||||
"Set up `evil' bindings for `pdf-view'."
|
||||
(evil-set-initial-state 'pdf-view-mode 'motion)
|
||||
(evil-define-key 'motion pdf-view-mode-map
|
||||
|
@ -68,8 +68,8 @@
|
|||
(kbd "<prior>") 'backward-page
|
||||
(kbd "<down>") 'pdf-view-next-line-or-next-page
|
||||
(kbd "<up>") 'pdf-view-previous-line-or-previous-page
|
||||
"gg" 'evil-pdf-view-goto-first-page
|
||||
"G" 'evil-pdf-view-goto-page
|
||||
"gg" 'evil-collection-pdf-view-goto-first-page
|
||||
"G" 'evil-collection-pdf-view-goto-page
|
||||
|
||||
;; mark
|
||||
"'" 'pdf-view-jump-to-register
|
||||
|
@ -221,5 +221,5 @@
|
|||
"ZQ" 'tablist-quit
|
||||
"ZZ" 'tablist-quit))
|
||||
|
||||
(provide 'evil-pdf)
|
||||
;;; evil-pdf.el ends here
|
||||
(provide 'evil-collection-pdf)
|
||||
;;; evil-collection-pdf.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-proced.el --- Evil bindings for proced -*- lexical-binding: t -*-
|
||||
;;; evil-collection-proced.el --- Evil bindings for proced -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'evil)
|
||||
(require 'proced)
|
||||
|
||||
(defun evil-proced-setup ()
|
||||
(defun evil-collection-proced-setup ()
|
||||
(evil-set-initial-state 'proced-mode 'motion)
|
||||
|
||||
(evil-define-key 'motion proced-mode-map
|
||||
|
@ -84,5 +84,5 @@
|
|||
"ZQ" 'evil-quit
|
||||
"ZZ" 'quit-window))
|
||||
|
||||
(provide 'evil-proced)
|
||||
;;; evil-proced.el ends here
|
||||
(provide 'evil-collection-proced)
|
||||
;;; evil-collection-proced.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-prodigy.el --- Evil bindings for prodigy -*- lexical-binding: t -*-
|
||||
;;; evil-collection-prodigy.el --- Evil bindings for prodigy -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'evil)
|
||||
(require 'prodigy nil t)
|
||||
|
||||
(defun evil-prodigy-setup ()
|
||||
(defun evil-collection-prodigy-setup ()
|
||||
"Set up `evil' bindings for `prodigy'."
|
||||
(evil-define-key 'normal prodigy-mode-map
|
||||
;; quit
|
||||
|
@ -72,5 +72,5 @@
|
|||
(evil-define-key 'normal prodigy-view-mode-map
|
||||
"x" 'prodigy-view-clear-buffer))
|
||||
|
||||
(provide 'evil-prodigy)
|
||||
;;; evil-prodigy.el ends here
|
||||
(provide 'evil-collection-prodigy)
|
||||
;;; evil-collection-prodigy.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-profiler.el --- Evil bindings for profiler -*- lexical-binding: t -*-
|
||||
;;; evil-collection-profiler.el --- Evil bindings for profiler -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'evil)
|
||||
(require 'profiler)
|
||||
|
||||
(defun evil-profiler-setup ()
|
||||
(defun evil-collection-profiler-setup ()
|
||||
"Set up `evil' bindings for `profiler'."
|
||||
(evil-set-initial-state 'profiler-report-mode 'motion)
|
||||
|
||||
|
@ -65,5 +65,5 @@
|
|||
"ZQ" 'evil-quit
|
||||
"ZZ" 'quit-windw))
|
||||
|
||||
(provide 'evil-profiler)
|
||||
;;; evil-profiler.el ends here
|
||||
(provide 'evil-collection-profiler)
|
||||
;;; evil-collection-profiler.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-rtags.el --- Evil bindings for `rtags'. -*- lexical-binding: t -*-
|
||||
;;; evil-collection-rtags.el --- Evil bindings for `rtags'. -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
|||
(defvar rtags-references-tree-mode-map)
|
||||
(defvar rtags-location-stack-visualize-mode-map)
|
||||
|
||||
(defun evil-rtags-setup ()
|
||||
(defun evil-collection-rtags-setup ()
|
||||
"Set up `evil' bindings for `rtags'."
|
||||
(evil-set-initial-state 'rtags-mode 'normal)
|
||||
(evil-set-initial-state 'rtags-dependency-tree-mode 'normal)
|
||||
|
@ -132,5 +132,5 @@
|
|||
"x" 'rtags-select-and-remove-rtags-buffer
|
||||
"q" 'rtags-call-bury-or-delete))
|
||||
|
||||
(provide 'evil-rtags)
|
||||
;;; evil-rtags.el ends here
|
||||
(provide 'evil-collection-rtags)
|
||||
;;; evil-collection-rtags.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-slime.el --- Evil bindings for `slime' -*- lexical-binding: t -*-
|
||||
;;; evil-collection-slime.el --- Evil bindings for `slime' -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
|||
(defvar sldb-mode-map)
|
||||
(defvar slime-inspector-mode-map)
|
||||
|
||||
(defun evil-slime-last-sexp (command &rest args)
|
||||
(defun evil-collection-slime-last-sexp (command &rest args)
|
||||
"In normal-state or motion-state, last sexp ends at point."
|
||||
(if (and (not evil-move-beyond-eol)
|
||||
(or (evil-normal-state-p) (evil-motion-state-p)))
|
||||
|
@ -42,14 +42,14 @@
|
|||
(apply command args))
|
||||
(apply command args)))
|
||||
|
||||
(defun evil-slime-setup ()
|
||||
(defun evil-collection-slime-setup ()
|
||||
"Set up `evil' bindings for `slime'."
|
||||
(unless evil-move-beyond-eol
|
||||
(advice-add 'slime-eval-last-expression :around 'evil-slime-last-sexp)
|
||||
(advice-add 'slime-pprint-eval-last-expression :around 'evil-slime-last-sexp)
|
||||
(advice-add 'slime-eval-print-last-expression :around 'evil-slime-last-sexp)
|
||||
(advice-add 'slime-eval-last-expression :around 'evil-collection-slime-last-sexp)
|
||||
(advice-add 'slime-pprint-eval-last-expression :around 'evil-collection-slime-last-sexp)
|
||||
(advice-add 'slime-eval-print-last-expression :around 'evil-collection-slime-last-sexp)
|
||||
(advice-add 'slime-eval-last-expression-in-repl
|
||||
:around 'evil-slime-last-sexp))
|
||||
:around 'evil-collection-slime-last-sexp))
|
||||
|
||||
(evil-collection-util-evilify-map
|
||||
sldb-mode-map
|
||||
|
@ -101,5 +101,5 @@
|
|||
|
||||
(add-hook 'slime-popup-buffer-mode-hook #'evil-normalize-keymaps))
|
||||
|
||||
(provide 'evil-slime)
|
||||
;;; evil-slime.el ends here
|
||||
(provide 'evil-collection-slime)
|
||||
;;; evil-collection-slime.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-term.el --- Evil bindings for term and ansi-term -*- lexical-binding: t -*-
|
||||
;;; evil-collection-term.el --- Evil bindings for term and ansi-term -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -39,19 +39,19 @@
|
|||
;;; Otherwise leave ESC to "C-c C-j".
|
||||
;;; Or bind char-mode ESC to "C-c C-x"?
|
||||
|
||||
(defun evil-term-escape-stay ()
|
||||
(defun evil-collection-term-escape-stay ()
|
||||
"Go back to normal state but don't move cursor backwards.
|
||||
Moving cursor backwards is the default Vim behavior but
|
||||
it is not appropriate in some cases like terminals."
|
||||
(setq-local evil-move-cursor-back nil))
|
||||
|
||||
(defun evil-term-char-mode-insert ()
|
||||
(defun evil-collection-term-char-mode-insert ()
|
||||
"Switch to `term-char-mode' and enter insert state."
|
||||
(interactive)
|
||||
(term-char-mode)
|
||||
(evil-insert-state))
|
||||
|
||||
(defun evil-term-char-mode-entry-function ()
|
||||
(defun evil-collection-term-char-mode-entry-function ()
|
||||
"Maybe switch to `term-char-mode' on insert state."
|
||||
(when (get-buffer-process (current-buffer))
|
||||
(let (last-prompt)
|
||||
|
@ -63,22 +63,22 @@ it is not appropriate in some cases like terminals."
|
|||
(when (>= (point) last-prompt)
|
||||
(term-char-mode)))))
|
||||
|
||||
(defun evil-term-sync-state-and-mode ()
|
||||
(defun evil-collection-term-sync-state-and-mode ()
|
||||
"Sync `term-char-mode' and `term-line-mode' with insert and normal state."
|
||||
(add-hook 'evil-insert-state-entry-hook
|
||||
'evil-term-char-mode-entry-function nil t)
|
||||
(add-hook 'evil-insert-state-exit-hook 'term-line-mode nil t))
|
||||
|
||||
(defun evil-term-send-tab ()
|
||||
(defun evil-collection-term-send-tab ()
|
||||
"Send tab in term mode."
|
||||
(interactive)
|
||||
(term-send-raw-string "\t"))
|
||||
|
||||
(defun evil-term-setup ()
|
||||
(defun evil-collection-term-setup ()
|
||||
"Set up `evil' bindings for `term'."
|
||||
(evil-set-initial-state 'term-mode 'insert)
|
||||
(add-hook 'term-mode-hook 'evil-term-sync-state-and-mode)
|
||||
(add-hook 'term-mode-hook 'evil-term-escape-stay)
|
||||
(add-hook 'term-mode-hook 'evil-collection-term-sync-state-and-mode)
|
||||
(add-hook 'term-mode-hook 'evil-collection-term-escape-stay)
|
||||
|
||||
;; Evil has some "C-" bindings in insert state that shadow regular terminal bindings.
|
||||
;; Don't raw-send "C-c" (prefix key) nor "C-h" (help prefix).
|
||||
|
@ -102,12 +102,12 @@ it is not appropriate in some cases like terminals."
|
|||
(kbd "C-w") 'term-send-raw
|
||||
(kbd "C-y") 'term-send-raw
|
||||
(kbd "C-z") 'term-send-raw
|
||||
(kbd "<tab>") 'evil-term-send-tab ; Should not be necessary.
|
||||
(kbd "<tab>") 'evil-collection-term-send-tab ; Should not be necessary.
|
||||
(kbd "C-c C-d") 'term-send-eof
|
||||
(kbd "C-c C-z") 'term-stop-subjob)
|
||||
|
||||
(evil-define-key 'normal term-mode-map
|
||||
(kbd "C-c C-k") 'evil-term-char-mode-insert
|
||||
(kbd "C-c C-k") 'evil-collection-term-char-mode-insert
|
||||
(kbd "<return>") 'term-send-input
|
||||
|
||||
(kbd "p") 'term-paste
|
||||
|
@ -123,5 +123,5 @@ it is not appropriate in some cases like terminals."
|
|||
"^" 'term-bol
|
||||
"$" 'term-show-maximum-output))
|
||||
|
||||
(provide 'evil-term)
|
||||
;;; evil-term.el ends here
|
||||
(provide 'evil-collection-term)
|
||||
;;; evil-collection-term.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-tide.el --- Bindings for `tide-mode'. -*- lexical-binding: t -*-
|
||||
;;; evil-collection-tide.el --- Bindings for `tide-mode'. -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'tide nil t)
|
||||
(require 'evil)
|
||||
|
||||
(defun evil-tide-setup ()
|
||||
(defun evil-collection-tide-setup ()
|
||||
"Set up `evil' bindings for `tide'."
|
||||
(evil-define-key 'normal tide-mode-map
|
||||
"gd" 'tide-jump-to-definition
|
||||
|
@ -57,5 +57,5 @@
|
|||
;; quit
|
||||
(kbd "q") 'quit-window))
|
||||
|
||||
(provide 'evil-tide)
|
||||
;;; evil-tide.el ends here
|
||||
(provide 'evil-collection-tide)
|
||||
;;; evil-collection-tide.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-transmission.el --- Evil bindings for transmission.el -*- lexical-binding: t -*-
|
||||
;;; evil-collection-transmission.el --- Evil bindings for transmission.el -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
|||
(require 'evil)
|
||||
(require 'transmission nil t)
|
||||
|
||||
(defun evil-transmission-setup ()
|
||||
(defun evil-collection-transmission-setup ()
|
||||
"Set up `evil' bindings for `transmission'."
|
||||
(evil-set-initial-state 'transmission-mode 'motion)
|
||||
(evil-define-key 'motion transmission-mode-map
|
||||
|
@ -140,5 +140,5 @@
|
|||
"ZQ" 'evil-quit
|
||||
"ZZ" 'quit-window))
|
||||
|
||||
(provide 'evil-transmission)
|
||||
;;; evil-transmission.el ends here
|
||||
(provide 'evil-collection-transmission)
|
||||
;;; evil-collection-transmission.el ends here
|
|
@ -35,7 +35,7 @@
|
|||
"Set the default STATE for MODE."
|
||||
(let* ((mode-str (symbol-name mode))
|
||||
(state-str (symbol-name state))
|
||||
(defun-name (intern (format "evil-integration-%s-set-%s-default"
|
||||
(defun-name (intern (format "evil-collection-%s-set-%s-default"
|
||||
mode-str
|
||||
state-str))))
|
||||
`(progn
|
||||
|
@ -47,10 +47,10 @@
|
|||
(advice-add #',mode :after #',defun-name))))
|
||||
|
||||
(defmacro evil-collection-util-evilify-map (map &rest props)
|
||||
"`evil-evilified-state-evilify-map' with additional bindings.
|
||||
"`evil-collection-evilified-state-evilify-map' with additional bindings.
|
||||
This assumes the :bindings key is at the end."
|
||||
(let ((contains-bindings (plist-get props :bindings)))
|
||||
`(evil-evilified-state-evilify-map
|
||||
`(evil-evilified-state-evilify
|
||||
,map
|
||||
,@props
|
||||
,@(unless contains-bindings
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-vlf.el --- Evil bindings for vlf -*- lexical-binding: t -*-
|
||||
;;; evil-collection-vlf.el --- Evil bindings for vlf -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -32,14 +32,14 @@
|
|||
|
||||
(defvar vlf-mode-map)
|
||||
|
||||
(defun evil-vlf-decrease-batch-size ()
|
||||
(defun evil-collection-vlf-decrease-batch-size ()
|
||||
"Decrease vlf batch size by factor of 2."
|
||||
(interactive)
|
||||
(when (fboundp 'vlf-change-batch-size)
|
||||
(vlf-change-batch-size t)))
|
||||
|
||||
;;; Code:
|
||||
(defun evil-vlf-setup ()
|
||||
(defun evil-collection-vlf-setup ()
|
||||
"Set up `evil' bindings for `vlf'."
|
||||
(evil-set-initial-state 'vlf-mode 'normal)
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
|||
"[" 'vlf-prev-batch
|
||||
|
||||
"+" 'vlf-change-batch-size
|
||||
"-" 'evil-vlf-decrease-batch-size
|
||||
"-" 'evil-collection-vlf-decrease-batch-size
|
||||
"=" 'vlf-next-batch-from-point
|
||||
|
||||
;; refresh
|
||||
|
@ -71,5 +71,5 @@
|
|||
"L" 'vlf-goto-line
|
||||
"F" 'vlf-toggle-follow))
|
||||
|
||||
(provide 'evil-vlf)
|
||||
;;; evil-vlf.el ends here
|
||||
(provide 'evil-collection-vlf)
|
||||
;;; evil-collection-vlf.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-woman.el --- Evil bindings for WoMan -*- lexical-binding: t -*-
|
||||
;;; evil-collection-woman.el --- Evil bindings for WoMan -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -28,10 +28,10 @@
|
|||
|
||||
;;; Code:
|
||||
(require 'evil)
|
||||
(require 'evil-man) ; WoMan's keymap inherits from Man.
|
||||
(require 'evil-collection-man) ; WoMan's keymap inherits from Man.
|
||||
(require 'woman)
|
||||
|
||||
(defun evil-woman-setup ()
|
||||
(defun evil-collection-woman-setup ()
|
||||
"Set up `evil' bindings for `woman'."
|
||||
(evil-define-key 'motion woman-mode-map
|
||||
(kbd "]") 'WoMan-next-manpage
|
||||
|
@ -43,5 +43,5 @@
|
|||
;; refresh
|
||||
"gr" 'woman-reformat-last-file))
|
||||
|
||||
(provide 'evil-woman)
|
||||
;;; evil-woman.el ends here
|
||||
(provide 'evil-collection-woman)
|
||||
;;; evil-collection-woman.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-xref.el --- Evil bindings for xref -*- lexical-binding: t -*-
|
||||
;;; evil-collection-xref.el --- Evil bindings for xref -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 James Nguyen
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
(require 'evil-collection-util)
|
||||
(require 'xref)
|
||||
|
||||
(defun evil-xref-setup ()
|
||||
(defun evil-collection-xref-setup ()
|
||||
"Set up `evil' bindings for `xref'."
|
||||
(evil-define-key 'normal xref--xref-buffer-mode-map
|
||||
"q" 'quit-window
|
||||
|
@ -48,5 +48,5 @@
|
|||
"o" 'xref-show-location-at-point ; TODO: Remove binding?
|
||||
"go" 'xref-show-location-at-point))
|
||||
|
||||
(provide 'evil-xref)
|
||||
;;; evil-xref.el ends here
|
||||
(provide 'evil-collection-xref)
|
||||
;;; evil-collection-xref.el ends here
|
|
@ -1,4 +1,4 @@
|
|||
;;; evil-ztree.el --- Evil bindings for ztree -*- lexical-binding: t -*-
|
||||
;;; evil-collection-ztree.el --- Evil bindings for ztree -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
|||
(require 'evil)
|
||||
(require 'ztree nil t)
|
||||
|
||||
(defun evil-ztree-setup ()
|
||||
(defun evil-collection-ztree-setup ()
|
||||
"Set up `evil' bindings for `ztree'."
|
||||
(evil-set-initial-state 'ztree-mode 'motion)
|
||||
|
||||
|
@ -60,5 +60,5 @@
|
|||
"gr" 'ztree-diff-partial-rescan
|
||||
"gR" 'ztree-diff-full-rescan))
|
||||
|
||||
(provide 'evil-ztree)
|
||||
;;; evil-ztree.el ends here
|
||||
(provide 'evil-collection-ztree)
|
||||
;;; evil-collection-ztree.el ends here
|
|
@ -111,8 +111,8 @@ Alternatively, you may register select bindings manually, for
|
|||
instance:
|
||||
|
||||
(with-eval-after-load 'calendar
|
||||
(require 'evil-calendar)
|
||||
(evil-calendar-setup))"
|
||||
(require 'evil-collection-calendar)
|
||||
(evil-collection-calendar-setup))"
|
||||
(interactive)
|
||||
(dolist (mode evil-collection-mode-list)
|
||||
(let ((m mode)
|
||||
|
@ -122,8 +122,8 @@ instance:
|
|||
reqs (cdr mode)))
|
||||
(dolist (req reqs)
|
||||
(with-eval-after-load req
|
||||
(require (intern (concat "evil-" (symbol-name m))))
|
||||
(funcall (intern (concat "evil-" (symbol-name m) "-setup"))))))))
|
||||
(require (intern (concat "evil-collection-" (symbol-name m))))
|
||||
(funcall (intern (concat "evil-collection-" (symbol-name m) "-setup"))))))))
|
||||
|
||||
(provide 'evil-collection)
|
||||
;;; evil-collection.el ends here
|
||||
|
|
|
@ -43,15 +43,15 @@ some default bindings to change in the future.
|
|||
|
||||
or mode-by-mode, for instance:
|
||||
|
||||
: (with-eval-after-load 'calendar (require 'evil-calendar) (evil-calendar-setup))
|
||||
: (with-eval-after-load 'calendar (require 'evil-collection-calendar) (evil-collection-calendar-setup))
|
||||
|
||||
The list of supported modes is simply the list of files.
|
||||
|
||||
If you want to enable Evil in the minibuffer, you'll have to turn it on
|
||||
explicitly. This is so because many users find it confusing.
|
||||
|
||||
: (require 'evil-minibuffer)
|
||||
: (evil-minibuffer-init)
|
||||
: (require 'evil-collection-minibuffer)
|
||||
: (evil-collection-minibuffer-init)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue