101 lines
2.8 KiB
EmacsLisp
101 lines
2.8 KiB
EmacsLisp
|
;;; mitch-evil.el --- personal settings for evil-mode -*- lexical-binding: t; -*-
|
||
|
|
||
|
;; Copyright (C) 2023 mitch
|
||
|
|
||
|
;; Author: mitch <mitch@mitchmarq42.xyz>
|
||
|
;; Keywords:
|
||
|
|
||
|
;; This program is free software; you can redistribute it and/or modify
|
||
|
;; it under the terms of the GNU General Public License as published by
|
||
|
;; the Free Software Foundation, either version 3 of the License, or
|
||
|
;; (at your option) any later version.
|
||
|
|
||
|
;; This program is distributed in the hope that it will be useful,
|
||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
;; GNU General Public License for more details.
|
||
|
|
||
|
;; You should have received a copy of the GNU General Public License
|
||
|
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||
|
|
||
|
;;; Commentary:
|
||
|
|
||
|
;; put here because git branches are hard
|
||
|
|
||
|
;;; Code:
|
||
|
|
||
|
(use-package evil
|
||
|
:general
|
||
|
;; Visual lines. Redefined for auto-scrolling madness.
|
||
|
(general-define-key
|
||
|
:states 'normal
|
||
|
"<escape>" 'evil-beginning-of-line
|
||
|
"j" 'evil-next-visual-line
|
||
|
"k" 'evil-previous-visual-line
|
||
|
"C-n" 'move-screen-up-line
|
||
|
"C-p" 'move-screen-down-line)
|
||
|
(general-define-key
|
||
|
:states 'insert
|
||
|
"C-w" 'evil-window-map
|
||
|
"C-V" (general-key-dispatch
|
||
|
'evil-quoted-insert
|
||
|
"u" 'insert-char))
|
||
|
:diminish visual-line-mode
|
||
|
:custom
|
||
|
(echo-keystrokes 0.5)
|
||
|
(evil-want-integration t)
|
||
|
(evil-want-keybinding nil)
|
||
|
(evil-want-C-u-scroll nil)
|
||
|
(evil-want-C-i-jump nil)
|
||
|
;; (evil-vsplit-window-right t)
|
||
|
;; (evil-split-window-below t)
|
||
|
(evil-undo-system
|
||
|
(if (>= (string-to-number emacs-version) 28)
|
||
|
(quote undo-redo)
|
||
|
(quote undo-fu)))
|
||
|
:init (evil-mode t)
|
||
|
:config (mitch/evil-config))
|
||
|
(use-package evil-collection
|
||
|
:after evil
|
||
|
:diminish evil-collection-unimpaired-mode
|
||
|
:config (evil-collection-init))
|
||
|
(use-package evil-commentary
|
||
|
:after evil
|
||
|
:diminish 'evil-commentary-mode
|
||
|
:config (evil-commentary-mode)
|
||
|
:hook (prog-mode . evil-commentary-mode))
|
||
|
(use-package evil-surround
|
||
|
:after evil
|
||
|
:diminish 'global-evil-surround-mode
|
||
|
:hook (prog-mode . evil-surround-mode)
|
||
|
:config (global-evil-surround-mode 1))
|
||
|
(use-package evil-matchit
|
||
|
:after evil
|
||
|
:diminish 'evil-matchit-mode
|
||
|
:config (global-evil-matchit-mode 1))
|
||
|
|
||
|
(use-package evil-terminal-cursor-changer
|
||
|
:after evil
|
||
|
:diminish
|
||
|
:if (not (display-graphic-p))
|
||
|
:custom
|
||
|
(evil-motion-state-cursor 'box) ; █
|
||
|
(evil-visual-state-cursor 'box) ; █
|
||
|
(evil-normal-state-cursor 'box) ; █
|
||
|
(evil-insert-state-cursor 'bar) ; ⎸
|
||
|
(evil-emacs-state-cursor 'hbar) ; _
|
||
|
:config
|
||
|
(evil-terminal-cursor-changer-activate)
|
||
|
(xterm-mouse-mode))
|
||
|
(use-package evil-goggles
|
||
|
:diminish
|
||
|
:after evil
|
||
|
:init (evil-goggles-mode)
|
||
|
:custom-face
|
||
|
(evil-goggles-default-face
|
||
|
((t (:background "#303030" :foreground "#2233aa")))))
|
||
|
|
||
|
|
||
|
(provide 'mitch-evil)
|
||
|
;;; mitch-evil.el ends here
|