summaryrefslogtreecommitdiffstats
path: root/Emacs.org
diff options
context:
space:
mode:
authorjdlugosz963 <jdlugosz963@gmail.com>2022-08-21 02:54:32 +0200
committerjdlugosz963 <jdlugosz963@gmail.com>2022-08-21 02:54:32 +0200
commit73bac82db3901e33f00e1cb02662dd0d56184eb7 (patch)
tree33ea853c668b8316928cf14be521a0a2b60bebfd /Emacs.org
parentb92d691698965269a6f79cec667e0561e7276b02 (diff)
downloaddotfiles-73bac82db3901e33f00e1cb02662dd0d56184eb7.tar.gz
dotfiles-73bac82db3901e33f00e1cb02662dd0d56184eb7.zip
Emacs: Add custom buffer switch
Diffstat (limited to 'Emacs.org')
-rw-r--r--Emacs.org11
1 files changed, 9 insertions, 2 deletions
diff --git a/Emacs.org b/Emacs.org
index 962a810..218229e 100644
--- a/Emacs.org
+++ b/Emacs.org
@@ -228,6 +228,12 @@
228 228
229#+begin_src emacs-lisp 229#+begin_src emacs-lisp
230 230
231 (defun jd/switch-buffer ()
232 (interactive)
233 (let ((completion-regexp-list '("\\`[^*]"
234 "\\`\\([^T]\\|T\\($\\|[^A]\\|A\\($\\|[^G]\\|G\\($\\|[^S]\\|S.\\)\\)\\)\\).*")))
235 (call-interactively 'counsel-switch-buffer)))
236
231 (use-package counsel) 237 (use-package counsel)
232 (use-package ivy 238 (use-package ivy
233 :diminish 239 :diminish
@@ -240,7 +246,7 @@
240 ("C-k" . ivy-previous-line)) 246 ("C-k" . ivy-previous-line))
241 :config 247 :config
242 (ivy-mode 1)) 248 (ivy-mode 1))
243 249
244#+end_src 250#+end_src
245 251
246*** Keybinds 252*** Keybinds
@@ -252,7 +258,8 @@
252 "tt" '(counsel-load-theme :which-key "Choose theme")) 258 "tt" '(counsel-load-theme :which-key "Choose theme"))
253 259
254 (jd/leader-key-def 260 (jd/leader-key-def
255 "bb" '(counsel-switch-buffer :which-key "Buffer switch") 261 "bb" '(jd/switch-buffer :which-key "Buffer switch")
262 "ba" '(counsel-switch-buffer :which-key "Buffer switch")
256 "b" '(:ignore t :which-key "Buffer") 263 "b" '(:ignore t :which-key "Buffer")
257 "," '(counsel-switch-buffer :which-key "Buffer switch")) 264 "," '(counsel-switch-buffer :which-key "Buffer switch"))
258 265