From 06e0a80f7b509fc2a565aff9ec8311caf4bf6aae Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Sat, 27 Apr 2024 20:09:08 +0200 Subject: Remove trash and change name from jd/use-package to use-package! --- .emacs.d/jd/jd-keys.el | 156 +++++++++++++------------------------------------ 1 file changed, 39 insertions(+), 117 deletions(-) (limited to '.emacs.d/jd/jd-keys.el') diff --git a/.emacs.d/jd/jd-keys.el b/.emacs.d/jd/jd-keys.el index 26a6445..108c70c 100755 --- a/.emacs.d/jd/jd-keys.el +++ b/.emacs.d/jd/jd-keys.el @@ -1,124 +1,46 @@ ;;; Dotfiles --- Jakub Dlugosz emacs config ;;; Commentary: - +;; Custom keysets used in my emacs ;;; Code: -;; (jd/use-package evil "emacs-evil" -;; :init -;; (setq evil-want-integration t) -;; (setq evil-want-keybinding nil) -;; (setq evil-want-C-u-scroll t) -;; (setq evil-want-Y-yank-to-eol t) -;; (setq evil-want-C-i-jump nil) -;; (setq evil-undo-system 'undo-tree) -;; (setq evil-kill-on-visual-paste nil) -;; :config -;; (evil-set-initial-state 'exwm-mode 'emacs) -;; (evil-mode 1)) - -(jd/use-package multiple-cursors "emacs-multiple-cursors" - :config - (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines) - (global-set-key (kbd "C->") 'mc/mark-next-like-this) - (global-set-key (kbd "C-<") 'mc/mark-previous-like-this) - (global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)) - -(jd/use-package shackle "emacs-shackle") -(jd/use-package sway "emacs-sway") - -(jd/use-package general "emacs-general" - :config - (general-create-definer jd/leader-key-def - :keymaps '(normal insert visual emacs) - :prefix "SPC" - :global-prefix "C-z") - - (general-create-definer jd/ctrl-c-keys - :prefix "C-c") - - ;; (jd/leader-key-def - ;; "w" 'evil-window-map - ;; "wr" '(hydra-resize-window/body :which-key "Rezize window") - ;; "wd" '(evil-window-delete :which-key "Window delete")) - - (jd/leader-key-def - "ou" '(undo-tree-visualize :which-key "Open")) - - ;; remove . key - ;; (define-key evil-normal-state-map (kbd ".") '()) - (jd/leader-key-def - "f" '(:ignore t :which-key "Files") - "fs" '(save-buffer :which-key "File save") - "." '(find-file :which-key "Find file") - "ff" '(find-file :which-key "Find file")) - - (jd/leader-key-def - "e" '(:ignore t :which-key "Eval") - "eb" '(eval-buffer :which-key "Eval buffer") - "ee" '(eval-defun :which-key "Eval defun")) - - (jd/leader-key-def - :keymaps '(visual) - "er" '(eval-region :which-key "Eval region")) - - (defun jd/kill-other-buffers () - (interactive) - (mapc 'kill-buffer (cdr (buffer-list (current-buffer))))) - - (jd/leader-key-def - "bK" '(jd/kill-other-buffers :which-key "Kill other buffers") - "bk" '(kill-current-buffer :which-key "Kill buffer") - "bB" '(ibuffer :which-key "Open ibuffer"))) - - -(jd/use-package hydra "emacs-hydra" - ;; :defer t - :config - (defun jd/text-scale-increase () - (interactive) - (let ((old-face-attribute (face-attribute 'default :height))) - (set-face-attribute 'default nil :height (+ old-face-attribute 10)))) - - (defun jd/text-scale-decrease () - (interactive) - (let ((old-face-attribute (face-attribute 'default :height))) - (set-face-attribute 'default nil :height (- old-face-attribute 10)))) - - ;; (defhydra hydra-resize-window (:timeout 4) - ;; ("h" evil-window-decrease-width "<") - ;; ("l" evil-window-increase-width ">") - ;; ("k" evil-window-decrease-height "^") - ;; ("j" evil-window-increase-height "v") - ;; ("q" nil "finished" :exit t)) - - (defhydra hydra-text-scale-global (:timeout 4) - "scale text" - ("j" jd/text-scale-increase "in") - ("k" jd/text-scale-decrease "out") - ("q" nil "finished" :exit t)) - - (defhydra hydra-text-scale (:timeout 4) - "scale text" - ("j" text-scale-increase "in") - ("k" text-scale-decrease "out") - ("q" nil "finished" :exit t)) - - (jd/leader-key-def - "tS" '(hydra-text-scale-global/body :which-key "Scale text") - "ts" '(hydra-text-scale/body :which-key "Scale text"))) - - -(jd/use-package undo-tree "emacs-undo-tree" - :diminish - :config - (setq undo-tree-auto-save-history nil) - (global-undo-tree-mode 1)) - -;; (jd/use-package evil-collection "emacs-evil-collection" -;; :after evil -;; :config -;; (evil-collection-init)) - +(use-package! multiple-cursors "emacs-multiple-cursors" + :config + (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines) + (global-set-key (kbd "C->") 'mc/mark-next-like-this) + (global-set-key (kbd "C-<") 'mc/mark-previous-like-this) + (global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)) + + +(use-package! hydra "emacs-hydra" + ;; :defer t + :config + (defun jd/text-scale-increase () + (interactive) + (let ((old-face-attribute (face-attribute 'default :height))) + (set-face-attribute 'default nil :height (+ old-face-attribute 10)))) + + (defun jd/text-scale-decrease () + (interactive) + (let ((old-face-attribute (face-attribute 'default :height))) + (set-face-attribute 'default nil :height (- old-face-attribute 10)))) + + (defhydra hydra-text-scale-global (:timeout 4) + "scale text" + ("j" jd/text-scale-increase "in") + ("k" jd/text-scale-decrease "out") + ("q" nil "finished" :exit t)) ;; TODO not working + + (defhydra hydra-text-scale (:timeout 4) + "scale text" + ("j" text-scale-increase "in") + ("k" text-scale-decrease "out") + ("q" nil "finished" :exit t))) + +(use-package! undo-tree "emacs-undo-tree" + :diminish + :config + (setq undo-tree-auto-save-history nil) + (global-undo-tree-mode 1)) (provide 'jd-keys) -- cgit v1.2.3