Skip to content

Commit

Permalink
I made this :)
Browse files Browse the repository at this point in the history
  • Loading branch information
adasium committed Apr 19, 2024
1 parent a92aa88 commit 0bc7357
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions doom/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -319,3 +319,17 @@ Copilot accept completion if copilot-mode active, jump out quote or brackets, or
'("Visual Studio Code | " (:eval (if (buffer-file-name)
(abbreviate-file-name (buffer-file-name))
"%b"))))

(defvar chom/*switch-to-buf-name-alist* (list))
(map! :leader "o"
(lambda ()
(interactive)
(let ((c (read-char "c?")))
(if (= c ?o)
(let* ((l (read-char "char?"))
(bn (buffer-name)))
(if (eq nil (alist-get l chom/*switch-to-buf-name-alist*))
(setq chom/*switch-to-buf-name-alist* (append chom/*switch-to-buf-name-alist* (list (cons l bn))))
(setcdr (assq l chom/*switch-to-buf-name-alist*) bn)))
(let* ((b (assq c chom/*switch-to-buf-name-alist*)))
(if b (switch-to-buffer (cdr b)) (message (concat "nie zapisano bufora " (string c)))))))))

0 comments on commit 0bc7357

Please sign in to comment.