diff options
-rw-r--r-- | lisp/td-common.el | 21 | ||||
-rw-r--r-- | lisp/td-dired.el | 7 | ||||
-rw-r--r-- | lisp/td-functions.el | 9 |
3 files changed, 28 insertions, 9 deletions
diff --git a/lisp/td-common.el b/lisp/td-common.el index c703702..d355609 100644 --- a/lisp/td-common.el +++ b/lisp/td-common.el @@ -9,16 +9,17 @@ (use-package avy :ensure t - :bind (("C-'" . avy-goto-char-timer)) + :bind (("M-j" . avy-goto-char-timer)) :custom (avy-timeout-seconds 0.25)) (use-package consult :ensure t :demand t - :bind (("C-s" . consult-ripgrep) - ("C-M-l" . consult-imenu) - ("C-M-j" . consult-buffer) + :bind (("M-s g" . consult-ripgrep) + ("M-s f" . consult-find) + ("M-s i" . consult-imenu) + ("M-s l" . consult-line) ("C-x C-b" . consult-buffer) :map minibuffer-local-map ("C-r" . consult-history))) @@ -53,6 +54,16 @@ ;; By default start with a light theme. (load-theme 'ef-day t)) +(use-package emacs + :ensure nil + :demand t + :bind (("M-c" . capitalize-dwim) + ("M-u" . upcase-dwim) + ("M-l" . downcase-dwim) + ("C-x S" . eshell) + ("C-x M-t" . transpose-regions) + ("C-g" . td/quit-if-not-in-macro))) + (use-package embark :ensure t :bind (("C-." . embark-act) @@ -70,7 +81,7 @@ :ensure t :after embark) -(use-package helpful +(use-package help :ensure t :custom (counsel-describe-function-function #'helpful-callable) diff --git a/lisp/td-dired.el b/lisp/td-dired.el index 562c550..a3791b9 100644 --- a/lisp/td-dired.el +++ b/lisp/td-dired.el @@ -6,7 +6,8 @@ :ensure nil :commands (dired dired-jump) :hook ((dired-mode . dired-hide-details-mode)) - :bind (:map dired-mode-map ("C-x C-j" . dired-jump)) + :bind (:map dired-mode-map (("C-x C-j" . dired-jump) + ("b" . dired-up-directory))) :config (setq dired-listing-switches "-Agho --group-directories-first" dired-omit-files "^\\.[^.].*" @@ -22,9 +23,7 @@ (use-package dired-hide-dotfiles :ensure t :hook (dired-mode . dired-hide-dotfiles-mode) - :config - (evil-collection-define-key 'normal 'dired-mode-map - "H" 'dired-hide-dotfiles-mode)) + :bind (("H" . dired-hide-dotfiles-mode))) (provide 'td-dired) ;;; td-dired.el ends here diff --git a/lisp/td-functions.el b/lisp/td-functions.el index fbd4134..37faf28 100644 --- a/lisp/td-functions.el +++ b/lisp/td-functions.el @@ -27,6 +27,15 @@ :weight 'normal :height 200))) +(defun td/quit-if-not-in-macro () + (interactive) + (if (or defining-kbd-macro executing-kbd-macro) + (progn + (if (region-active-p) + (deactivate-mark) + (message "Macro running. Can't quit."))) + (keyboard-quit))) + (defun td/increment-number-at-point (&optional increment) "Increment number at point like vim's `C-a'." (interactive "p") |