evil-mode - fix comments, old custom function names

This commit is contained in:
Kashish Sharma 2018-09-07 11:12:08 +05:30
parent a3fd301cb7
commit 922b32f504
2 changed files with 32 additions and 30 deletions

View File

@ -2,33 +2,33 @@
(add-to-list 'load-path "~/.emacs.d/elisp-git/evil-snipe/")
(with-eval-after-load 'evil
;(evil-mode 1)
;;(evil-mode 1)
;; Want something to switch between evil and god-mode, instead of this.
;; They say there's a plugin for it...
(global-set-key (kbd "C-x e") 'evil-mode)
;(define-key evil-normal-state-map (kbd "<tab>") 'forward-button)
(cp-define-some-keys
;; (define-key evil-normal-state-map (kbd "<tab>") 'forward-button)
(cp-define-many-keys
evil-normal-state-map
'(("zR" 'yafolding-show-all)
("zM" 'yafolding-hide-all)
("zo" 'yafolding-show-element)
("zc" 'yafolding-hide-element)))
;(global-set-key (kbd "g C-g") 'count-words-region)
;;(global-set-key (kbd "g C-g") 'count-words-region)
; The story so far - in evil-normal-state-map, I set 'i' to
; evil-previous-visual-line, 'k' to evil-next-visual-line, 'j' to
; evil-backward-char. Note that I forgot to set 'h' to insert at
; first...but that's not all - later I realized this didn't affect
; Visual mode :p 4 more lines for that. Next...d/c didn't work with
; ijkl. 4 more lines for evil-operator-state-map. After that - you
; usually want visual-line up/down movement, but _not_ when you hit
; d-j/k (or d-i/k)! So, in evil-operator-state-map, i and k are now
; vanilla evil-previous/next-line. Set gi/gk to
; evil-previous/next-line in normal and visual states, and to
; evil-previous/next-visual-line in operator state - 2 new lines to
; each group of 4.
;; The story so far - in evil-normal-state-map, I set 'i' to
;; evil-previous-visual-line, 'k' to evil-next-visual-line, 'j' to
;; evil-backward-char. Note that I forgot to set 'h' to insert at
;; first...but that's not all - later I realized this didn't affect
;; Visual mode :p 4 more lines for that. Next...d/c didn't work with
;; ijkl. 4 more lines for evil-operator-state-map. After that - you
;; usually want visual-line up/down movement, but _not_ when you hit
;; d-j/k (or d-i/k)! So, in evil-operator-state-map, i and k are now
;; vanilla evil-previous/next-line. Set gi/gk to
;; evil-previous/next-line in normal and visual states, and to
;; evil-previous/next-visual-line in operator state - 2 new lines to
;; each group of 4.
(cp-define-some-keys
(cp-define-many-keys
evil-normal-state-map
'(("gi" evil-previous-visual-line)
("gk" evil-next-visual-line)
@ -37,7 +37,7 @@
( "j" evil-backward-char)
( "h" evil-insert)))
(cp-define-some-keys
(cp-define-many-keys
evil-visual-state-map
'(("gi" evil-previous-visual-line)
("gk" evil-next-visual-line)
@ -46,7 +46,7 @@
("j" evil-backward-char)
("h" evil-insert)))
(cp-define-some-keys
(cp-define-many-keys
evil-operator-state-map
'(("gi" evil-previous-visual-line)
("gk" evil-next-visual-line)
@ -54,7 +54,7 @@
("k" evil-next-line)
("j" evil-backward-char)
("h" evil-insert)
; evil-inner-tag ?
;; evil-inner-tag ?
("hW" evil-inner-WORD)
("hw" evil-inner-word)
("h\(" evil-inner-paren)
@ -72,23 +72,25 @@
("h\"" evil-inner-double-quote)
("h'" evil-inner-single-quote)))
(cp-define-some-keys
(cp-define-many-keys
evil-motion-state-map
'(("gi" evil-previous-visual-line)
("gk" evil-next-visual-line))))
;;;; set C-h to backspace when editing commands and searching
(defun kill-start-of-line ()
"Kill from point to start of line."
(interactive)
(kill-line 0))
(define-key evil-insert-state-map (kbd "C-u") 'kill-start-of-line)
(defun kill-start-of-line ()
"Kill from point to start of line."
(interactive)
(kill-line 0))
(define-key evil-insert-state-map (kbd "C-u") 'kill-start-of-line))
;;;; evil-snipe
(with-eval-after-load 'evil-snipe
(setq evil-snipe-count-scope 'letters)
;;;; This doesn't take two chars by default, which combined with
;;;; unimplemented evil-snipe-count-scope 'vertical makes it nearly
;;;; useless as a replacement for fFtT;
;; This doesn't take two chars by default, which combined with
;; unimplemented evil-snipe-count-scope 'vertical makes it nearly
;; useless as a replacement for fFtT;
(evil-snipe-replace-evil)
(global-evil-snipe-mode 1))
(evil-mode)

View File

@ -301,6 +301,7 @@ and eval it."
;; (load "cp-adb")
(load "cp-editing")
;; (load "cp-evil")
(load "cp-god")
(load "cp-fm")
(load "cp-lily")
(load "cp-sfz")
@ -347,7 +348,6 @@ and eval it."
(global-set-key (kbd "S-SPC") 'ace-jump-mode)
;; (load "cp-helm")
(load "cp-god")
(load "cp-hindi")
(load "cp-irc")
(load "cp-parens")