init.el: Enable avy and evil-surround

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
Sanchayan Maity 2019-02-23 11:03:12 +05:30
parent c75b23c765
commit 4490c2d937

38
init.el
View file

@ -98,6 +98,23 @@
(use-package fzf (use-package fzf
:ensure t) :ensure t)
;; Anzu for search matching
(use-package anzu
:ensure t
:config
(global-anzu-mode 1)
(global-set-key [remap query-replace-regexp]
'anzu-query-replace-regexp)
(global-set-key [remap query-replace]
'anzu-query-replace))
(use-package avy
:defer t
:init
(progn
(setq avy-all-windows 'all-frames)
(setq avy-background t)))
;; Vim mode ;; Vim mode
(use-package evil (use-package evil
:ensure t :ensure t
@ -111,21 +128,15 @@
(evil-escape-mode 1)) (evil-escape-mode 1))
(use-package evil-nerd-commenter (use-package evil-nerd-commenter
:ensure t) :ensure t)
(use-package evil-surround
:ensure t
:config
(global-evil-surround-mode 1))
(use-package disable-mouse (use-package disable-mouse
:ensure t :ensure t
:config :config
(global-disable-mouse-mode)) (global-disable-mouse-mode))
;; Anzu for search matching
(use-package anzu
:ensure t
:config
(global-anzu-mode 1)
(global-set-key [remap query-replace-regexp]
'anzu-query-replace-regexp)
(global-set-key [remap query-replace]
'anzu-query-replace))
;; Helm ;; Helm
(use-package helm (use-package helm
:ensure t :ensure t
@ -313,6 +324,7 @@
:which-key "open helm git grep") :which-key "open helm git grep")
"g*" '(helm-git-grep-at-point "g*" '(helm-git-grep-at-point
:which-key "open helm git grep at point") :which-key "open helm git grep at point")
;; evil nerd commenter
"ci" 'evilnc-comment-or-uncomment-lines "ci" 'evilnc-comment-or-uncomment-lines
"cl" 'evilnc-quick-comment-or-uncomment-to-the-line "cl" 'evilnc-quick-comment-or-uncomment-to-the-line
"ll" 'evilnc-quick-comment-or-uncomment-to-the-line "ll" 'evilnc-quick-comment-or-uncomment-to-the-line
@ -321,7 +333,11 @@
"cr" 'comment-or-uncomment-region "cr" 'comment-or-uncomment-region
"cv" 'evilnc-toggle-invert-comment-line-by-line "cv" 'evilnc-toggle-invert-comment-line-by-line
"." 'evilnc-copy-and-comment-operator "." 'evilnc-copy-and-comment-operator
"\\" 'evilnc-comment-operator)) "\\" 'evilnc-comment-operator
"jb" 'avy-pop-mark
"jj" 'evil-avy-goto-char-timer
"jl" 'evil-avy-goto-line
"jw" 'evil-avy-goto-word-or-subword-1))
(general-define-key (general-define-key
:states '(normal visual emacs) :states '(normal visual emacs)