Browse Source

evil: More configuration variables for Evil

master
Peter J. Jones 8 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 @@
;; Important load settings:
(setq user-emacs-directory (expand-file-name "~/.cache/emacs/")
evil-respect-visual-line-mode t ; Needed before Evil starts.
evil-want-integration nil ; Needed for evil-collection.
evil-want-keybinding nil) ; Needed for evil-collection.


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

@@ -3,8 +3,19 @@
;;; Commentary:
;;
;;; Code:
(require 'evil)
(require 'spaceline) ; Load faces.

;; Settings:
(custom-set-variables
'(evil-shift-width 2)
'(evil-default-cursor 'box)
'(evil-move-beyond-eol t)
'(evil-want-fine-undo t)
'(evil-want-Y-yank-to-eol t)
'(evil-lookup-func #'man)
'(evil-symbol-word-search t))

(defun pjones:evil-update-cursor ()
"Change the cursor to match the evil state."
(let* ((cursor
@@ -21,6 +32,10 @@
(setq cursor-type (car cursor))
(set-face-attribute 'cursor nil :foreground fg :background bg)))

;; Additional key bindings:
(define-key evil-motion-state-map " " #'evil-switch-to-windows-last-buffer)

;; Hooks:
(add-hook 'post-command-hook #'pjones:evil-update-cursor)
(add-hook 'evil-mode-hook 'evil-commentary-mode)
(add-hook 'evil-mode-hook 'global-evil-fringe-mark-mode)

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

@@ -76,7 +76,11 @@
(,(kbd "s-l") . ,(pjones:exwm-switch-to 9)))))

;; Simulated key presses to X Windows:
'(exwm-input-simulation-keys nil))
'(exwm-input-simulation-keys
'(([?\C-c ?\C-c] . [?\C-c])
([?\C-p] . [up])
([?\C-n] . [down]))))


(define-key exwm-workspace--switch-map (kbd "s-z") #'exwm-nw-goto-previous)
(define-key exwm-workspace--switch-map (kbd "C-z C-z") #'exwm-nw-goto-previous)

Loading…
Cancel
Save