mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-29 14:33:34 -05:00
Combine doom/open-scratch-buffer & doom/open-project-scratch-buffer
These two are now doom/open-scratch-buffer. If you're in a project, a (persistent) scratch buffer is opened. Otherwise, a non-persistent, transient scratch buffer is opened. If ARG (universal argument) is non-nil, then use the current window instead of a new window (or popup, if feature/popup is enabled). Also, the ex command :x[!] is improved. The BANG = open in current window.
This commit is contained in:
@@ -2,10 +2,14 @@
|
||||
|
||||
(defalias 'ex! 'evil-ex-define-cmd)
|
||||
|
||||
(evil-define-command doom:cleanup-session (&optional bang)
|
||||
(evil-define-command doom:cleanup-session (bang)
|
||||
(interactive "<!>")
|
||||
(doom/cleanup-session bang))
|
||||
|
||||
(evil-define-operator doom:open-scratch-buffer (bang)
|
||||
(interactive "<!>")
|
||||
(doom/open-scratch-buffer bang))
|
||||
|
||||
|
||||
;;
|
||||
;; Commands
|
||||
@@ -38,7 +42,7 @@
|
||||
(ex! "sh[ell]" #'+eshell:run)
|
||||
(ex! "t[mux]" #'+tmux:run) ; send to tmux
|
||||
(ex! "tcd" #'+tmux:cd-here) ; cd to default-directory in tmux
|
||||
(ex! "x" #'doom/open-project-scratch-buffer)
|
||||
(ex! "x" #'doom:open-scratch-buffer)
|
||||
;; GIT
|
||||
(ex! "gist" #'+gist:send) ; send current buffer/region to gist
|
||||
(ex! "gistl" #'+gist:list) ; list gists by user
|
||||
|
Reference in New Issue
Block a user