improve scratch buffer handling / kbd shortcuts
This commit is contained in:
parent
e8745cf990
commit
9025732e3b
|
@ -533,6 +533,8 @@
|
|||
(use-package popwin
|
||||
:bind ( :map popwin:keymap
|
||||
("h" . popwin:close-popup-window)
|
||||
("r" . kmn/workspace-frame-scratch)
|
||||
("R" . kmn/popwin-scratch)
|
||||
("q" . kmn/popwin-quick-ref))
|
||||
:config
|
||||
(global-set-key (kbd "C-w") popwin:keymap)
|
||||
|
|
|
@ -150,6 +150,33 @@
|
|||
)
|
||||
)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; open text-mode scratch in left side window
|
||||
(defun kmn/scratch-prompt-on-left ()
|
||||
(defvar parameters
|
||||
'(window-parameters . ((no-other-window . t)
|
||||
(no-delete-other-windows . t))))
|
||||
|
||||
(setq fit-window-to-buffer-horizontally t)
|
||||
(setq window-resize-pixelwise t)
|
||||
|
||||
"Display `default-directory' in side window on left, hiding details."
|
||||
(interactive)
|
||||
(let ((buffer (scratch (let ((current-prefix-arg t)) (scratch--buffer-querymode)))))
|
||||
(display-buffer-in-side-window
|
||||
buffer `((side . left) (slot . -1)
|
||||
(window-width . fit-window-to-buffer)
|
||||
, parameters)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; text-mode scratch buffer as a pop up window
|
||||
(defun kmn/popwin-scratch ()
|
||||
(interactive)
|
||||
(popwin:popup-buffer (scratch 'text-mode)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; quick reference notes as a pop up window
|
||||
(defun kmn/popwin-quick-ref ()
|
||||
|
|
Reference in a new issue