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 /.emacs.d/lisp/init-windows.el | |
parent | 988e427843a1fe7cd55ee33c6ea7738f04a2ecd6 (diff) | |
download | dotfiles-a3d03d956ab84f6835bd62bdc8810b389e0aa97e.tar.gz |
Try out various packages
Diffstat (limited to '.emacs.d/lisp/init-windows.el')
-rw-r--r-- | .emacs.d/lisp/init-windows.el | 46 |
1 files changed, 46 insertions, 0 deletions
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 |