diff --git a/custom.el b/custom.el index a4c0fe9..fe89d63 100644 --- a/custom.el +++ b/custom.el @@ -7,7 +7,8 @@ '(eglot-code-action-indications '(eldoc-hint)) '(package-selected-packages '(cape dumb-jump dumber-jump exec-path-from-shell jai-mode magit - markdown-mode move-text multiple-cursors yaml yaml-mode)) + markdown-mode move-text multiple-cursors vterm yaml + yaml-mode)) '(package-vc-selected-packages '((jai-mode :url "https://github.com/valignatev/jai-mode.git")))) (custom-set-faces diff --git a/init.el b/init.el index 8ea34ce..0b3018c 100644 --- a/init.el +++ b/init.el @@ -9,10 +9,6 @@ (load-theme 'modus-vivendi) -(defun hgh/edit-init-file () - (interactive) - (find-file user-init-file)) - (when (string= system-type "darwin") (setq dired-use-ls-dired nil) (setq mac-command-modifier 'control)) @@ -24,13 +20,19 @@ (keymap-global-set "M-1" #'delete-other-windows) (keymap-global-set "M-2" #'split-window-below) (keymap-global-set "M-3" #'split-window-right) + (keymap-global-set "C-c e i" #'hgh/edit-init-file) +(keymap-global-set "C-," #'hgh/duplicate-dwim) (setq custom-file "~/.emacs.d/custom.el" make-backup-files nil dired-dwim-target t) +(load-file "~/.emacs.d/utils.el") + +(setq-default cursor-type 'bar) + (setopt use-short-answers t use-dialog-box nil @@ -66,7 +68,7 @@ (use-package move-text :bind (("M-" . 'move-text-down) - ("M-" . 'move-text-up))) + ("M-" . 'move-text-up))) (use-package jai-mode :vc (:url "https://github.com/valignatev/jai-mode.git" @@ -76,9 +78,17 @@ :bind ("C-x g" . magit-status)) (use-package multiple-cursors - :bind (("C->" . mc/mark-next-like-this) - ("C-<" . mc/mark-previous-like-this) - ("C-c C-<" . mc/mark-all-like-this))) + :custom + (mc/always-run-for-all t) + :bind (("C->" . mc/mark-next-like-this) + ("C-<" . mc/mark-previous-like-this) + ("C-c C-<" . mc/mark-all-like-this) + ("C-c C->" . mc/mark-lines)) + :init + (advice-add 'mc/mark-next-like-this :before #'hgh/set-box-cursor) + (advice-add 'mc/mark-previous-like-this :before #'hgh/set-box-cursor) + (advice-add 'mc/mark-all-like-this :before #'hgh/set-box-cursor) + (add-hook 'multiple-cursors-mode-disabled-hook #'hgh/set-bar-cursor)) (use-package cape :hook ((completion-at-point-functions . cape-dabbrev) @@ -113,3 +123,5 @@ (push '(sql-mode "postgres-language-server" "lsp-proxy") eglot-server-programs)) (use-package yaml-mode) + +(use-package vterm)