diff options
author | David Morgan <djm_uk@protonmail.com> | 2022-10-21 16:54:28 +0100 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2022-10-21 16:54:28 +0100 |
commit | a3d03d956ab84f6835bd62bdc8810b389e0aa97e (patch) | |
tree | d20ee11922cbc3d4f0bd18b4e2e641e4d30897e8 | |
parent | 988e427843a1fe7cd55ee33c6ea7738f04a2ecd6 (diff) | |
download | dotfiles-a3d03d956ab84f6835bd62bdc8810b389e0aa97e.tar.gz |
Try out various packages
-rw-r--r-- | .emacs.d/lisp/init-clojure.el | 10 | ||||
-rw-r--r-- | .emacs.d/lisp/init-navigation.el | 25 | ||||
-rw-r--r-- | .emacs.d/lisp/init-search.el | 2 | ||||
-rw-r--r-- | .emacs.d/lisp/init-windows.el | 46 |
4 files changed, 81 insertions, 2 deletions
diff --git a/.emacs.d/lisp/init-clojure.el b/.emacs.d/lisp/init-clojure.el index 73542f1..d86787f 100644 --- a/.emacs.d/lisp/init-clojure.el +++ b/.emacs.d/lisp/init-clojure.el @@ -115,8 +115,16 @@ cider-show-error-buffer 'except-in-repl clojure-toplevel-inside-comment-form t) (unbind-key "C-c C-l" cider-mode-map) + (unbind-key "C-c C-b" cider-mode-map) + (unbind-key "C-c C-b" cider-repl-mode-map) :bind - (:map cider-mode-map ("C-c M-l" . cider-load-file)) + (:map cider-mode-map + ("C-c M-l" . cider-load-file) + ("C-c M-b" . cider-interrupt)) + (:map cider-repl-mode-map + ("C-c M-b" . cider-interrupt)) + (:map cider-start-map + ("C-c M-j" . cider-jack-in-and-run-main)) (:map clojure-mode-map ("C-c C-r C-m" . run-main) ("C-c M-j" . cider-jack-in-and-run-main) diff --git a/.emacs.d/lisp/init-navigation.el b/.emacs.d/lisp/init-navigation.el index f3232cd..0e0492d 100644 --- a/.emacs.d/lisp/init-navigation.el +++ b/.emacs.d/lisp/init-navigation.el @@ -81,5 +81,30 @@ Or remove all highlighted symbols in the current buffer (with`ARG')." ("C-c {" . gumshoe-persp-backtrack-back) ("C-c '" . gumshoe-peruse-in-persp)) +(use-package goto-chg + :config + (defvar goto-chg-repeat-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "C-(") #'goto-last-change) + (define-key map (kbd "C-)") #'goto-last-change-reverse) + map)) + (dolist (cmd '(goto-last-change goto-last-change-reverse)) + (put cmd 'repeat-map 'goto-chg-repeat-map)) + :bind + ("C-c C-(" . goto-last-change) + ("C-c C-)" . goto-last-change-reverse)) + +(use-package goto-last-point + :diminish + :custom (goto-last-point-max-length 100) + :hook (emacs-startup . goto-last-point-mode) + :config + (defvar goto-last-point-repeat-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "<") #'goto-last-point) + map)) + (put 'goto-last-point 'repeat-map 'goto-last-point-repeat-map) + :bind ("C-c <" . goto-last-point)) + (provide 'init-navigation) ;;; init-navigation.el ends here diff --git a/.emacs.d/lisp/init-search.el b/.emacs.d/lisp/init-search.el index 76f899f..8e89f31 100644 --- a/.emacs.d/lisp/init-search.el +++ b/.emacs.d/lisp/init-search.el @@ -55,7 +55,7 @@ (define-key search-map "d" 'deadgrep) (define-key search-map "D" 'deadgrep-symbol-at-point) :bind - ("C-," . deadgrep-symbol-at-point) + ("C-S-z" . deadgrep-symbol-at-point) ("C-c c d" . deadgrep)) (use-package affe diff --git a/.emacs.d/lisp/init-windows.el b/.emacs.d/lisp/init-windows.el index a96cf07..616ad1f 100644 --- a/.emacs.d/lisp/init-windows.el +++ b/.emacs.d/lisp/init-windows.el @@ -93,5 +93,51 @@ (popper-mode +1) (popper-echo-mode +1)))) +(use-package frog-jump-buffer + :config + (defun frog-jump-buffer-filter-buffer-ring (buffer) + "Check if a BUFFER is in current buffer ring." + (let ((bfr-ring (buffer-ring-current-ring))) + (when bfr-ring + (let ((ring (buffer-ring-ring-ring bfr-ring))) + (unless (dynaring-empty-p ring) + (dynaring-contains-p ring (buffer-ring--parse-buffer buffer))))))) + (defun frog-jump-buffer-filter-buffer-ring-or-same-mode (buffer) + (let* ((bfr-ring (buffer-ring-current-ring)) + (ring (buffer-ring-ring-ring bfr-ring))) + (if (dynaring-empty-p ring) + (frog-jump-buffer-filter-same-mode buffer) + (frog-jump-buffer-filter-buffer-ring buffer)))) + ;;(setq frog-jump-buffer-default-filter 'frog-jump-buffer-filter-same-mode) + (setq frog-jump-buffer-default-filter 'frog-jump-buffer-filter-buffer-ring-or-same-mode) + (setq frog-jump-buffer-filter-actions + '(("R" "[Ring]" frog-jump-buffer-filter-buffer-ring))) + (set-face-background 'frog-menu-posframe-background-face "black") + :bind + ("C-," . frog-jump-buffer) + ("C-x 4 C-," . frog-jump-buffer-other-window)) + +;; TODO perspective integration +(use-package buffer-ring + :diminish + :hook (emacs-startup . buffer-ring-mode) + :bind + ("C-<" . buffer-ring-prev-buffer) + ("C->" . buffer-ring-next-buffer)) + +;; TODO C-c ./C-c , C-c >/C-c < , available (but the first two currently clash with other bindings) +;; C-<left> and C-<right> can be used +(use-package cbm + :bind + ("C-c C-b <" . cbm-cycle) + ("C-c C-b C-b" . cbm-switch-buffer)) + +(use-package buffer-flip + :bind (("C-c C-<left>" . buffer-flip) + (:map buffer-flip-map + ( "C-<left>" . buffer-flip-forward) + ( "C-<right>" . buffer-flip-backward) + ( "C-g" . buffer-flip-abort)))) + (provide 'init-windows) ;;; init-windows.el ends here |