mirror of
https://github.com/librephoenix/nixos-config
synced 2025-10-19 01:54:02 +05:30
More scratch buffer functions
This commit is contained in:
parent
80e7c3bc6b
commit
e1a29072eb
1 changed files with 22 additions and 0 deletions
|
@ -244,8 +244,30 @@
|
||||||
(progn
|
(progn
|
||||||
(select-window (scratch-plus-switch nil)))))
|
(select-window (scratch-plus-switch nil)))))
|
||||||
|
|
||||||
|
(defun scratch-plus-only ()
|
||||||
|
(interactive)
|
||||||
|
(if (projectile-project-p)
|
||||||
|
(progn
|
||||||
|
(select-window (scratch-plus-switch-project nil)))
|
||||||
|
(progn
|
||||||
|
(select-window (scratch-plus-switch nil))))
|
||||||
|
(delete-other-windows))
|
||||||
|
|
||||||
|
(defun scratch-plus-main-toggle ()
|
||||||
|
(interactive)
|
||||||
|
(select-window (scratch-plus-switch nil)))
|
||||||
|
|
||||||
|
|
||||||
|
(defun scratch-plus-main-only ()
|
||||||
|
(interactive)
|
||||||
|
(select-window (scratch-plus-switch nil))
|
||||||
|
(delete-other-windows))
|
||||||
|
|
||||||
;; File and buffer keybinds
|
;; File and buffer keybinds
|
||||||
(evil-define-key 'motion 'global (kbd "<leader>x") 'scratch-plus-toggle)
|
(evil-define-key 'motion 'global (kbd "<leader>x") 'scratch-plus-toggle)
|
||||||
|
(evil-define-key 'motion 'global (kbd "<leader>X") 'scratch-plus-main-toggle)
|
||||||
|
(evil-define-key 'motion 'global (kbd "<leader>z") 'scratch-plus-only)
|
||||||
|
(evil-define-key 'motion 'global (kbd "<leader>Z") 'scratch-plus-main-only)
|
||||||
(evil-define-key 'motion 'global (kbd "<leader>.") 'find-file)
|
(evil-define-key 'motion 'global (kbd "<leader>.") 'find-file)
|
||||||
(evil-define-key 'motion 'global (kbd "<leader>bi") 'ibuffer)
|
(evil-define-key 'motion 'global (kbd "<leader>bi") 'ibuffer)
|
||||||
(evil-define-key 'motion 'global (kbd "<leader>bd") 'evil-delete-buffer)
|
(evil-define-key 'motion 'global (kbd "<leader>bd") 'evil-delete-buffer)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue