Created
August 7, 2023 08:39
-
-
Save win0err/b2c7ac974326f8c1f65fbb5ded42bcf2 to your computer and use it in GitHub Desktop.
Toggle treemacs window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun treemacs-toggle () | |
"Toggle treemacs exclusively with the current project. | |
If the treemacs window is visible, hide it; otherwise, create and show it with the current project exclusively." | |
(interactive) | |
(if (eq (treemacs-current-visibility) 'visible) | |
(delete-window (treemacs-get-local-window)) | |
(treemacs-add-and-display-current-project-exclusively))) | |
(global-set-key (kbd "C-c b") 'treemacs-toggle) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment