Compare commits
2 Commits
5b4ea43ccb
...
e9faf3469b
Author | SHA1 | Date | |
---|---|---|---|
|
e9faf3469b | ||
|
a2a28e63bd |
@ -61,7 +61,6 @@
|
|||||||
;; Consult adds a bunch of completing-read based utilities
|
;; Consult adds a bunch of completing-read based utilities
|
||||||
(use-package consult
|
(use-package consult
|
||||||
:general
|
:general
|
||||||
([remap switch-to-buffer] #'consult-buffer)
|
([remap switch-to-buffer] #'consult-buffer))
|
||||||
([remap isearch-forward] #'consult-line))
|
|
||||||
|
|
||||||
(provide 'init-completion)
|
(provide 'init-completion)
|
||||||
|
68
emacs/.emacs.d/config/init-editing.el
Normal file
68
emacs/.emacs.d/config/init-editing.el
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
;; General text editing configuration
|
||||||
|
|
||||||
|
;; Tree-shaped undos
|
||||||
|
(use-package undo-tree
|
||||||
|
:config
|
||||||
|
(global-undo-tree-mode)
|
||||||
|
:general
|
||||||
|
("C-c C-r" #'undo-tree-visualize))
|
||||||
|
|
||||||
|
;; Better isearch
|
||||||
|
(use-package ctrlf
|
||||||
|
:config
|
||||||
|
(ctrlf-mode 1))
|
||||||
|
|
||||||
|
;; "pair" management, where pairs are parentheses, braces, etc.
|
||||||
|
(use-package smartparens
|
||||||
|
:config
|
||||||
|
(require 'smartparens-config)
|
||||||
|
(smartparens-global-mode)
|
||||||
|
(defun sp-wrap-double-quote ()
|
||||||
|
(interactive)
|
||||||
|
(sp-wrap-with-pair "\""))
|
||||||
|
(defun sp-wrap-single-quote ()
|
||||||
|
(interactive)
|
||||||
|
(sp-wrap-with-pair "'"))
|
||||||
|
:hook
|
||||||
|
(prog-mode . smartparens-strict-mode)
|
||||||
|
:general
|
||||||
|
;; Wrapping
|
||||||
|
(leader-map
|
||||||
|
"s(" #'sp-wrap-round
|
||||||
|
"s{" #'sp-wrap-curly
|
||||||
|
"s'" #'sp-wrap-single-quote
|
||||||
|
"s\"" #'sp-wrap-double-quote
|
||||||
|
"sW" #'sp-unwrap-sexp
|
||||||
|
"sl" #'sp-next-sexp
|
||||||
|
"sh" #'sp-backward-sexp
|
||||||
|
"sj" #'sp-down-sexp
|
||||||
|
"sk" #'sp-backward-up-sexp
|
||||||
|
"sL" #'sp-forward-symbol
|
||||||
|
"sH" #'sp-backward-symbol
|
||||||
|
"s^" #'sp-beginning-of-sexp
|
||||||
|
"s$" #'sp-end-of-sexp
|
||||||
|
"st" #'sp-transpose-sexp
|
||||||
|
"su" #'undo-tree-undo
|
||||||
|
"sy" #'sp-copy-sexp
|
||||||
|
"sd" #'sp-kill-sexp
|
||||||
|
"ss" #'sp-forward-slurp-sexp
|
||||||
|
"sS" #'sp-backward-slurp-sexp
|
||||||
|
"sb" #'sp-forward-barf-sexp
|
||||||
|
"sB" #'sp-backward-barf-sexp
|
||||||
|
"sv" #'sp-select-next-thing
|
||||||
|
"sV" #'sp-select-previous-thing)
|
||||||
|
(normal "g(" #'sp-wrap-round
|
||||||
|
"g[" #'sp-wrap-square
|
||||||
|
"g{" #'sp-wrap-curly
|
||||||
|
"g\"" #'sp-wrap-double-quote
|
||||||
|
"g'" #'sp-wrap-single-quote))
|
||||||
|
|
||||||
|
(use-package evil-smartparens
|
||||||
|
:after (evil smartparens)
|
||||||
|
:hook (smartparens-enabled . evil-smartparens-mode))
|
||||||
|
|
||||||
|
;; Automagical indent
|
||||||
|
(use-package aggressive-indent
|
||||||
|
:hook (prog-mode . aggressive-indent-mode))
|
||||||
|
|
||||||
|
(provide 'init-editing)
|
@ -3,7 +3,9 @@
|
|||||||
:init
|
:init
|
||||||
(setq evil-want-keybinding nil)
|
(setq evil-want-keybinding nil)
|
||||||
:config
|
:config
|
||||||
(evil-mode 1))
|
(evil-mode 1)
|
||||||
|
:custom
|
||||||
|
(evil-undo-system 'undo-tree))
|
||||||
|
|
||||||
(use-package evil-collection
|
(use-package evil-collection
|
||||||
:after evil)
|
:after evil)
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
(require 'init-windows)
|
(require 'init-windows)
|
||||||
(require 'init-dired)
|
(require 'init-dired)
|
||||||
(require 'init-completion)
|
(require 'init-completion)
|
||||||
|
(require 'init-editing)
|
||||||
(require 'init-ui)
|
(require 'init-ui)
|
||||||
(require 'init-projects)
|
(require 'init-projects)
|
||||||
(require 'init-git)
|
(require 'init-git)
|
||||||
|
Loading…
Reference in New Issue
Block a user