diff options
-rw-r--r-- | Emacs.org | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 | ||