[defaults] add qickrun

bind it to `SPC x x`, not sure it's the right place but it's easy to invoke
This commit is contained in:
Thanh Vuong 2021-04-11 22:47:02 -06:00 committed by Maximilian Wolff
parent 866c362d06
commit 056eb6b91b
No known key found for this signature in database
GPG Key ID: 2DD07025BFDBD89A
6 changed files with 29 additions and 1 deletions

View File

@ -212,6 +212,7 @@
- [[#error-transient-state][Error transient state]]
- [[#custom-fringe-bitmaps][Custom fringe bitmaps]]
- [[#compiling][Compiling]]
- [[#quickrun][Quickrun]]
- [[#editorconfig][EditorConfig]]
- [[#emacs-server][Emacs Server]]
- [[#connecting-to-the-emacs-server][Connecting to the Emacs server]]
@ -3689,6 +3690,14 @@ Spacemacs binds a few commands to support compiling a project.
| ~SPC c m~ | =helm-make= |
| ~SPC c r~ | recompile |
** Quickrun
Spacemacs can execute current buffer or region.
| Key binding | Description |
|-------------+---------------------------------------------------|
| ~SPC x x~ | smart =quickrun= or =quickrun-region= |
| ~C-g~ | to dismiss a quickrun buffer without selecting it |
* EditorConfig
Spacemacs has support for [[http://editorconfig.org/][EditorConfig]], a configuration file to "define and
maintain consistent coding styles between different editors and IDEs."

View File

@ -33,6 +33,7 @@ defaults.
- package-menu
- page-break-lines
- process-menu
- quickrun
- recentf
- savehist
- saveplace

View File

@ -1782,6 +1782,14 @@ Decision is based on `dotspacemacs-line-numbers'."
(not disabled-for-parent)))))
;; quick run
(defun spacemacs/quickrun ()
"Call `quickrun' or `quickrun-region'"
(interactive)
(if (region-active-p)
(call-interactively 'quickrun-region)
(quickrun)))
;; randomize region
(defun spacemacs/randomize-words (beg end)

View File

@ -48,6 +48,7 @@
;; page-break-lines is shipped with spacemacs core
(page-break-lines :location built-in)
(process-menu :location built-in)
quickrun
(recentf :location built-in)
(savehist :location built-in)
(saveplace :location built-in)
@ -377,6 +378,14 @@
(defun spacemacs-defaults/init-process-menu ()
(evilified-state-evilify process-menu-mode process-menu-mode-map))
(defun spacemacs-defaults/init-quickrun ()
(use-package quickrun
:defer t
:init
(setq quickrun-focus-p nil)
(spacemacs/set-leader-keys
"xx" 'spacemacs/quickrun)))
(defun spacemacs-defaults/init-recentf ()
(use-package recentf
:defer (spacemacs/defer)

View File

@ -31,5 +31,5 @@
(defvar evil-lisp-safe-structural-editing-modes '()
"A list of major mode symbols where safe structural editing is supported.")
(defvar spacemacs-evil-collection-allowed-list '(eww dired)
(defvar spacemacs-evil-collection-allowed-list '(eww dired quickrun)
"List of modes Spacemacs will allow to be evilified by evil-collection-init.")

View File

@ -101,6 +101,7 @@
(setq popwin:special-display-config nil)
;; buffers that we manage
(push '("*quickrun*" :dedicated t :position bottom :stick t :noselect t :height 0.3) popwin:special-display-config)
(push '("*Help*" :dedicated t :position bottom :stick t :noselect t :height 0.4) popwin:special-display-config)
(push '("*Process List*" :dedicated t :position bottom :stick t :noselect nil :height 0.4) popwin:special-display-config)
(push '(compilation-mode :dedicated nil :position bottom :stick t :noselect t :height 0.4) popwin:special-display-config)