updated multiple cursors; add move-text
This commit is contained in:
@@ -9,8 +9,8 @@
|
|||||||
dockerfile-mode dumb-jump dumber-jump emacs-lldb
|
dockerfile-mode dumb-jump dumber-jump emacs-lldb
|
||||||
exec-path-from-shell flycheck fsharp-mode haskell-mode
|
exec-path-from-shell flycheck fsharp-mode haskell-mode
|
||||||
haskell-ts-mode helm htmlize idris-mode marginalia
|
haskell-ts-mode helm htmlize idris-mode marginalia
|
||||||
markdown-ts-mode multiple-cursors odin-mode orderless
|
markdown-ts-mode move-text multiple-cursors odin-mode
|
||||||
org-mode parinfer-rust-mode realgud-lldb rg sly
|
orderless org-mode parinfer-rust-mode realgud-lldb rg sly
|
||||||
terraform-mode tree-sitter-langs vertico visual-fill-column
|
terraform-mode tree-sitter-langs vertico visual-fill-column
|
||||||
yasnippet-snippets zig-mode))
|
yasnippet-snippets zig-mode))
|
||||||
'(safe-local-variable-directories '("/Users/grant/programming/project/edit/"))
|
'(safe-local-variable-directories '("/Users/grant/programming/project/edit/"))
|
||||||
|
|||||||
36
init.el
36
init.el
@@ -8,8 +8,9 @@
|
|||||||
(require 'use-package-ensure)
|
(require 'use-package-ensure)
|
||||||
(require 'bind-key)
|
(require 'bind-key)
|
||||||
|
|
||||||
; If startup times are slow
|
;; If startup times are slow
|
||||||
; (setq use-package-verbose t)
|
;; (setq use-package-verbose t)
|
||||||
|
;; (setq use-package-compute-statistics t)
|
||||||
|
|
||||||
(add-to-list 'load-path (concat (file-name-parent-directory user-init-file) "local-lisp/"))
|
(add-to-list 'load-path (concat (file-name-parent-directory user-init-file) "local-lisp/"))
|
||||||
|
|
||||||
@@ -110,6 +111,7 @@
|
|||||||
(keymap-global-set "M-1" #'delete-other-windows)
|
(keymap-global-set "M-1" #'delete-other-windows)
|
||||||
(keymap-global-set "M-2" #'split-window-below)
|
(keymap-global-set "M-2" #'split-window-below)
|
||||||
(keymap-global-set "M-3" #'split-window-right)
|
(keymap-global-set "M-3" #'split-window-right)
|
||||||
|
(keymap-global-set "C-," #'duplicate-dwim)
|
||||||
|
|
||||||
(require 'dired)
|
(require 'dired)
|
||||||
(setq dired-dwim-target t)
|
(setq dired-dwim-target t)
|
||||||
@@ -283,21 +285,21 @@
|
|||||||
(file-name-nondirectory (directory-file-name default-directory))
|
(file-name-nondirectory (directory-file-name default-directory))
|
||||||
" rg*"))))
|
" rg*"))))
|
||||||
|
|
||||||
|
(defun hgh/set-cursor-type-box (&rest _args)
|
||||||
|
(setq-local cursor-type 'box))
|
||||||
|
|
||||||
|
(defun hgh/set-cursor-type-bar (&rest _args)
|
||||||
|
(setq-local cursor-type 'bar))
|
||||||
|
|
||||||
(use-package multiple-cursors
|
(use-package multiple-cursors
|
||||||
|
:hook ((multiple-cursors-mode-disabled . hgh/set-cursor-type-bar))
|
||||||
|
:bind (("C->" . mc/mark-next-like-this)
|
||||||
|
("C-<" . mc/mark-previous-like-this))
|
||||||
:init
|
:init
|
||||||
(add-hook 'multiple-cursors-mode-enabled-hook
|
;; NOTE(grant): I have no idea if the package is deferred or autoloaded anymore
|
||||||
(lambda ()
|
(advice-add 'mc/mark-next-like-this :before #'hgh/set-cursor-type-box)
|
||||||
(remove-hook 'activate-mark-hook 'hgh/disable-bar-cursor)
|
(advice-add 'mc/mark-previous-like-this :before #'hgh/set-cursor-type-box))
|
||||||
(remove-hook 'deactivate-mark-hook 'hgh/disable-bar-cursor)
|
|
||||||
(blink-cursor-mode 1)))
|
|
||||||
(add-hook 'multiple-cursors-mode-disabled-hook
|
|
||||||
(lambda ()
|
|
||||||
(add-hook 'activate-mark-hook 'hgh/disable-bar-cursor)
|
|
||||||
(add-hook 'deactivate-mark-hook 'hgh/disable-bar-cursor)
|
|
||||||
(blink-cursor-mode 1)))
|
|
||||||
:config
|
|
||||||
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
|
|
||||||
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this))
|
|
||||||
|
|
||||||
(use-package yasnippet
|
(use-package yasnippet
|
||||||
:diminish
|
:diminish
|
||||||
@@ -400,3 +402,7 @@
|
|||||||
(codex-provider nil)
|
(codex-provider nil)
|
||||||
(codex-model nil)
|
(codex-model nil)
|
||||||
:ensure nil)
|
:ensure nil)
|
||||||
|
|
||||||
|
(use-package move-text
|
||||||
|
:bind (("M-<up>" . move-text-up)
|
||||||
|
("M-<down>" . move-text-down)))
|
||||||
|
|||||||
Reference in New Issue
Block a user