Browse Source

evil: More configuration variables for Evil

master
Peter J. Jones 6 months ago
parent
commit
17d9ab4e17
Signed by: Peter Jones <pjones@devalot.com> GPG Key ID: 9DAFAA8D01941E49
3 changed files with 21 additions and 1 deletions
  1. 1
    0
      dot.emacs.el
  2. 15
    0
      modes/evil-conf.el
  3. 5
    1
      modes/exwm-conf.el

+ 1
- 0
dot.emacs.el View File

@@ -1,5 +1,6 @@
1 1
 ;; Important load settings:
2 2
 (setq user-emacs-directory (expand-file-name "~/.cache/emacs/")
3
+      evil-respect-visual-line-mode t    ; Needed before Evil starts.
3 4
       evil-want-integration nil          ; Needed for evil-collection.
4 5
       evil-want-keybinding nil)          ; Needed for evil-collection.
5 6
 

+ 15
- 0
modes/evil-conf.el View File

@@ -3,8 +3,19 @@
3 3
 ;;; Commentary:
4 4
 ;;
5 5
 ;;; Code:
6
+(require 'evil)
6 7
 (require 'spaceline) ; Load faces.
7 8
 
9
+;; Settings:
10
+(custom-set-variables
11
+ '(evil-shift-width 2)
12
+ '(evil-default-cursor 'box)
13
+ '(evil-move-beyond-eol t)
14
+ '(evil-want-fine-undo t)
15
+ '(evil-want-Y-yank-to-eol t)
16
+ '(evil-lookup-func #'man)
17
+ '(evil-symbol-word-search t))
18
+
8 19
 (defun pjones:evil-update-cursor ()
9 20
   "Change the cursor to match the evil state."
10 21
   (let* ((cursor
@@ -21,6 +32,10 @@
21 32
     (setq cursor-type (car cursor))
22 33
     (set-face-attribute 'cursor nil :foreground fg :background bg)))
23 34
 
35
+;; Additional key bindings:
36
+(define-key evil-motion-state-map " " #'evil-switch-to-windows-last-buffer)
37
+
38
+;; Hooks:
24 39
 (add-hook 'post-command-hook #'pjones:evil-update-cursor)
25 40
 (add-hook 'evil-mode-hook 'evil-commentary-mode)
26 41
 (add-hook 'evil-mode-hook 'global-evil-fringe-mark-mode)

+ 5
- 1
modes/exwm-conf.el View File

@@ -76,7 +76,11 @@
76 76
             (,(kbd "s-l") . ,(pjones:exwm-switch-to 9)))))
77 77
 
78 78
   ;; Simulated key presses to X Windows:
79
-  '(exwm-input-simulation-keys nil))
79
+  '(exwm-input-simulation-keys
80
+    '(([?\C-c ?\C-c] . [?\C-c])
81
+      ([?\C-p]       . [up])
82
+      ([?\C-n]       . [down]))))
83
+
80 84
 
81 85
 (define-key exwm-workspace--switch-map (kbd "s-z")     #'exwm-nw-goto-previous)
82 86
 (define-key exwm-workspace--switch-map (kbd "C-z C-z") #'exwm-nw-goto-previous)

Loading…
Cancel
Save