mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-24 03:50:24 +10:00
Minor edits.
This commit is contained in:
@@ -91,8 +91,8 @@
|
||||
(evil-ex-define-cmd "tabl[ast]" #'+workspace/switch-to-last)
|
||||
(evil-ex-define-cmd "tabload" #'+workspace:load)
|
||||
(evil-ex-define-cmd "tabn[ew]" #'+workspace:new)
|
||||
(evil-ex-define-cmd "tabn[ext]" #'+workspace:switch-next)
|
||||
(evil-ex-define-cmd "tabp[rev]" #'+workspace:switch-previous)
|
||||
(evil-ex-define-cmd "tabnext" #'+workspace:switch-next)
|
||||
(evil-ex-define-cmd "tabprev" #'+workspace:switch-previous)
|
||||
(evil-ex-define-cmd "tabr[ename]" #'+workspace:rename)
|
||||
(evil-ex-define-cmd "tabs" #'+workspace/display)
|
||||
(evil-ex-define-cmd "tabsave" #'+workspace:save)
|
||||
|
||||
@@ -106,6 +106,8 @@ And these are text objects added by this module:
|
||||
+ =g= The entire buffer
|
||||
+ =i j k= by indentation (=k= includes one line above; =j= includes one line
|
||||
above and below) (provided by ~evil-indent-plus~)
|
||||
+ =q= For quotes (any kind)
|
||||
+ =u= For URLs
|
||||
+ =x= XML attributes (provided by ~exato~)
|
||||
|
||||
** Custom Ex Commands
|
||||
|
||||
@@ -42,3 +42,25 @@ This excludes the protocol and querystring."
|
||||
(evil-range
|
||||
beg (- end (if (evil-visual-state-p) 1 0))
|
||||
type)))
|
||||
|
||||
;;;###autoload (autoload '+evil:inner-any-quote "editor/evil/autoload/textobjects" nil nil)
|
||||
(evil-define-text-object +evil:inner-any-quote (count &optional beg end type)
|
||||
"Select the closest inner quote."
|
||||
(let ((evil-textobj-anyblock-blocks
|
||||
'(("'" . "'")
|
||||
("\"" . "\"")
|
||||
("`" . "`")
|
||||
("‘" . "’")
|
||||
("“" . "”"))))
|
||||
(evil-textobj-anyblock-inner-block count beg end type)))
|
||||
|
||||
;;;###autoload (autoload '+evil:outer-any-quote "editor/evil/autoload/textobjects" nil nil)
|
||||
(evil-define-text-object +evil:outer-any-quote (count &optional beg end type)
|
||||
"Select the closest outer quote."
|
||||
(let ((evil-textobj-anyblock-blocks
|
||||
'(("'" . "'")
|
||||
("\"" . "\"")
|
||||
("`" . "`")
|
||||
("‘" . "’")
|
||||
("“" . "”"))))
|
||||
(evil-textobj-anyblock-a-block count beg end type)))
|
||||
|
||||
@@ -49,7 +49,11 @@ directives. By default, this only recognizes C directives.")
|
||||
evil-ex-interactive-search-highlight 'selected-window
|
||||
;; It's infuriating that innocuous "beginning of line" or "end of line"
|
||||
;; errors will abort macros, so suppress them:
|
||||
evil-kbd-macro-suppress-motion-error t)
|
||||
evil-kbd-macro-suppress-motion-error t
|
||||
evil-undo-system
|
||||
(cond ((featurep! :emacs undo +tree) 'undo-tree)
|
||||
((featurep! :emacs undo) 'undo-fu)
|
||||
(EMACS28+ 'undo-redo)))
|
||||
|
||||
;; Slow this down from 0.02 to prevent blocking in large or folded buffers
|
||||
;; like magit while incrementally highlighting matches.
|
||||
@@ -223,7 +227,7 @@ directives. By default, this only recognizes C directives.")
|
||||
;;; Packages
|
||||
|
||||
(use-package! evil-easymotion
|
||||
:after-call pre-command-hook
|
||||
:after-call doom-first-input-hook
|
||||
:commands evilem-create evilem-default-keybindings
|
||||
:config
|
||||
;; Use evil-search backend, instead of isearch
|
||||
@@ -234,7 +238,19 @@ directives. By default, this only recognizes C directives.")
|
||||
(evilem-make-motion evilem-motion-search-word-forward #'evil-ex-search-word-forward
|
||||
:bind ((evil-ex-search-highlight-all nil)))
|
||||
(evilem-make-motion evilem-motion-search-word-backward #'evil-ex-search-word-backward
|
||||
:bind ((evil-ex-search-highlight-all nil))))
|
||||
:bind ((evil-ex-search-highlight-all nil)))
|
||||
|
||||
;; Rebind scope of w/W/e/E/ge/gE evil-easymotion motions to the visible
|
||||
;; buffer, rather than just the current line.
|
||||
(put 'visible 'bounds-of-thing-at-point (lambda () (cons (window-start) (window-end))))
|
||||
(evilem-make-motion evilem-motion-forward-word-begin #'evil-forward-word-begin :scope 'visible)
|
||||
(evilem-make-motion evilem-motion-forward-WORD-begin #'evil-forward-WORD-begin :scope 'visible)
|
||||
(evilem-make-motion evilem-motion-forward-word-end #'evil-forward-word-end :scope 'visible)
|
||||
(evilem-make-motion evilem-motion-forward-WORD-end #'evil-forward-WORD-end :scope 'visible)
|
||||
(evilem-make-motion evilem-motion-backward-word-begin #'evil-backward-word-begin :scope 'visible)
|
||||
(evilem-make-motion evilem-motion-backward-WORD-begin #'evil-backward-WORD-begin :scope 'visible)
|
||||
(evilem-make-motion evilem-motion-backward-word-end #'evil-backward-word-end :scope 'visible)
|
||||
(evilem-make-motion evilem-motion-backward-WORD-end #'evil-backward-WORD-end :scope 'visible))
|
||||
|
||||
|
||||
(use-package! evil-embrace
|
||||
@@ -325,7 +341,8 @@ directives. By default, this only recognizes C directives.")
|
||||
(use-package! evil-nerd-commenter
|
||||
:commands (evilnc-comment-operator
|
||||
evilnc-inner-comment
|
||||
evilnc-outer-commenter))
|
||||
evilnc-outer-commenter)
|
||||
:general ([remap comment-line] #'evilnc-comment-or-uncomment-lines))
|
||||
|
||||
|
||||
(use-package! evil-snipe
|
||||
@@ -353,6 +370,16 @@ directives. By default, this only recognizes C directives.")
|
||||
:config (global-evil-surround-mode 1))
|
||||
|
||||
|
||||
(use-package! evil-textobj-anyblock
|
||||
:defer t
|
||||
:config
|
||||
(setq evil-textobj-anyblock-blocks
|
||||
'(("(" . ")")
|
||||
("{" . "}")
|
||||
("\\[" . "\\]")
|
||||
("<" . ">"))))
|
||||
|
||||
|
||||
(use-package! evil-traces
|
||||
:after evil-ex
|
||||
:config
|
||||
@@ -391,7 +418,7 @@ directives. By default, this only recognizes C directives.")
|
||||
;; implement dictionary keybinds
|
||||
;; evil already defines 'z=' to `ispell-word' = correct word at point
|
||||
(:when (featurep! :checkers spell)
|
||||
:n "zq" #'+spell/add-word
|
||||
:n "zg" #'+spell/add-word
|
||||
:n "zw" #'+spell/remove-word
|
||||
:m "[s" #'+spell/previous-error
|
||||
:m "]s" #'+spell/next-error)
|
||||
@@ -512,7 +539,8 @@ directives. By default, this only recognizes C directives.")
|
||||
"o" #'doom/window-enlargen
|
||||
;; Delete window
|
||||
"d" #'evil-window-delete
|
||||
"C-C" #'ace-delete-window)
|
||||
"C-C" #'ace-delete-window
|
||||
"T" #'tear-off-window)
|
||||
|
||||
;; text objects
|
||||
:textobj "a" #'evil-inner-arg #'evil-outer-arg
|
||||
@@ -523,6 +551,7 @@ directives. By default, this only recognizes C directives.")
|
||||
:textobj "i" #'evil-indent-plus-i-indent #'evil-indent-plus-a-indent
|
||||
:textobj "j" #'evil-indent-plus-i-indent-up-down #'evil-indent-plus-a-indent-up-down
|
||||
:textobj "k" #'evil-indent-plus-i-indent-up #'evil-indent-plus-a-indent-up
|
||||
:textobj "q" #'+evil:inner-any-quote #'+evil:outer-any-quote
|
||||
:textobj "u" #'+evil:inner-url-txtobj #'+evil:outer-url-txtobj
|
||||
:textobj "x" #'evil-inner-xml-attr #'evil-outer-xml-attr
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; editor/evil/packages.el
|
||||
|
||||
(package! evil :pin "1e7aa5bfbd86feff0ed5982e487070352d326b90")
|
||||
(package! evil :pin "373a57e5fc41b9597ed7f7223806ae2ffc16ade6")
|
||||
(package! evil-args :pin "758ad5ae54ad34202064fec192c88151c08cb387")
|
||||
(package! evil-easymotion :pin "f96c2ed38ddc07908db7c3c11bcd6285a3e8c2e9")
|
||||
(package! evil-embrace :pin "4379adea032b25e359d01a36301b4a5afdd0d1b7")
|
||||
@@ -11,7 +11,7 @@
|
||||
(package! evil-exchange :pin "3030e21ee16a42dfce7f7cf86147b778b3f5d8c1")
|
||||
(package! evil-indent-plus :pin "0c7501e6efed661242c3a20e0a6c79a6455c2c40")
|
||||
(package! evil-lion :pin "6b03593f5dd6e7c9ca02207f9a73615cf94c93ab")
|
||||
(package! evil-nerd-commenter :pin "87734b9c7fcd047f73a072b9d03ec05f786eeb03")
|
||||
(package! evil-nerd-commenter :pin "b670f69b646693b50645760ee3b12bd1b9eba46b")
|
||||
(package! evil-numbers
|
||||
:recipe (:host github :repo "janpath/evil-numbers")
|
||||
:pin "006da406d175c05fedca4431cccd569e20bef92c")
|
||||
@@ -33,4 +33,4 @@
|
||||
(package! neotree)
|
||||
(autoload 'neotree-make-executor "neotree" nil nil 'macro))
|
||||
|
||||
(package! evil-collection :pin "c136589d9584e5d01a4b3f2e4cf8ac5f5a23be63"))
|
||||
(package! evil-collection :pin "a21725fd3256f024beb5355b7913d4f7d09d849a"))
|
||||
|
||||
@@ -637,8 +637,8 @@ to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
${4:<one line to give the program's name and a brief idea of what it does.>}
|
||||
Copyright (C) ${1:`(format-time-string "%Y")`} ${2:`user-full-name`}
|
||||
|
||||
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
|
||||
@@ -658,7 +658,7 @@ Also add information on how to contact you by electronic and paper mail.
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
${3:<program>} Copyright (C) ${1:`(format-time-string "%Y")`} ${2:`user-full-name`}
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
@@ -104,7 +104,7 @@ Stolen shamelessly from go-mode"
|
||||
Prompts for a formatter if universal arg is set."
|
||||
(cond ((or (eq +format-with :none)
|
||||
(doom-temp-buffer-p (current-buffer))
|
||||
(doom-special-buffer-p (current-buffer)))
|
||||
(derived-mode-p 'special-mode))
|
||||
(list nil nil))
|
||||
(current-prefix-arg
|
||||
(list (or (+format-completing-read)
|
||||
|
||||
@@ -44,7 +44,7 @@ This is controlled by `+format-on-save-enabled-modes'."
|
||||
(memq major-mode (cdr +format-on-save-enabled-modes)))
|
||||
((not (memq major-mode +format-on-save-enabled-modes))))
|
||||
(not (require 'format-all nil t)))
|
||||
(format-all-mode +1)))
|
||||
(+format-enable-on-save-h)))
|
||||
|
||||
(when (featurep! +onsave)
|
||||
(add-hook 'after-change-major-mode-hook #'+format-enable-on-save-maybe-h))
|
||||
@@ -62,3 +62,7 @@ This is controlled by `+format-on-save-enabled-modes'."
|
||||
;; 2. Applies changes via RCS patch, line by line, to protect buffer markers
|
||||
;; and avoid any jarring cursor+window scrolling.
|
||||
(advice-add #'format-all-buffer--with :around #'+format-buffer-a)
|
||||
|
||||
;; format-all-mode "helpfully" raises an error when it doesn't know how to
|
||||
;; format a buffer.
|
||||
(add-to-list 'debug-ignored-errors "^Don't know how to format ")
|
||||
|
||||
@@ -77,6 +77,8 @@
|
||||
(evil-numbers/dec-at-pt-incremental)
|
||||
;; :tools eval
|
||||
(+eval:replace-region . +multiple-cursors-execute-default-operator-fn)
|
||||
;; :lang ess
|
||||
(ess-smart-comma . evil-mc-execute-call)
|
||||
;; :lang org
|
||||
(evil-org-delete . evil-mc-execute-default-evil-delete)))
|
||||
(setf (alist-get (car fn) evil-mc-custom-known-commands)
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
yas-lookup-snippet
|
||||
yas-insert-snippet
|
||||
yas-new-snippet
|
||||
yas-visit-snippet-file)
|
||||
yas-visit-snippet-file
|
||||
yas-activate-extra-mode
|
||||
yas-deactivate-extra-mode)
|
||||
:init
|
||||
;; Remove default ~/.emacs.d/snippets
|
||||
(defvar yas-snippet-dirs nil)
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
:recipe (:host github
|
||||
:repo "hlissner/doom-snippets"
|
||||
:files ("*.el" "*"))
|
||||
:pin "60c57d66d2afd1798bff5023a54ab155f311746a")
|
||||
:pin "e1cbbdf526224066f6bb67f95672d329323ecb1c")
|
||||
|
||||
Reference in New Issue
Block a user