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
: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
(use-package evil
:ensure t
@ -111,21 +128,15 @@
(evil-escape-mode 1))
(use-package evil-nerd-commenter
:ensure t)
(use-package evil-surround
:ensure t
:config
(global-evil-surround-mode 1))
(use-package disable-mouse
:ensure t
:config
(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
(use-package helm
:ensure t
@ -313,6 +324,7 @@
:which-key "open helm git grep")
"g*" '(helm-git-grep-at-point
:which-key "open helm git grep at point")
;; evil nerd commenter
"ci" 'evilnc-comment-or-uncomment-lines
"cl" '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
"cv" 'evilnc-toggle-invert-comment-line-by-line
"." '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
:states '(normal visual emacs)