SLY: Bind S-SPC to ambrevar/sly-insert-double-quotes.
parent
852cf2f9f9
commit
20af21461c
|
@ -76,12 +76,25 @@ If REFRESH is non-nil, rebuild the environment."
|
|||
(global-helm-sly-mode)
|
||||
(add-to-list 'helm-source-names-using-follow "Lisp xrefs"))
|
||||
|
||||
(defun ambrevar/sly-insert-double-quotes ()
|
||||
"Convenient to write list of string, e.g. when writing a shell command line."
|
||||
(interactive)
|
||||
(while (sly-inside-string-p)
|
||||
(forward-char))
|
||||
(cycle-spacing)
|
||||
(insert "\"\"")
|
||||
(backward-char)
|
||||
(when (and (boundp 'evil-state)
|
||||
(not (eq evil-state 'insert)))
|
||||
(call-interactively #'evil-insert)))
|
||||
|
||||
(with-eval-after-load 'sly-mrepl
|
||||
(set-face-attribute 'sly-mrepl-output-face nil :inherit 'default :foreground)
|
||||
(setq sly-mrepl-history-file-name (expand-file-name "sly-mrepl-history" user-emacs-directory))
|
||||
;; While `,i RET` is short enough, it's one more key away in Evil insert state:
|
||||
(define-key sly-mrepl-mode-map (kbd "C-c M-p") 'sly-mrepl-set-package)
|
||||
(define-key sly-mrepl-mode-map (kbd "C-c M-o") 'sly-mrepl-clear-repl))
|
||||
(define-key sly-mrepl-mode-map (kbd "C-c M-o") 'sly-mrepl-clear-repl)
|
||||
(define-key sly-mrepl-mode-map (kbd "S-SPC") 'ambrevar/sly-insert-double-quotes))
|
||||
|
||||
(defun ambrevar/sly-load-reload-system ()
|
||||
(interactive)
|
||||
|
|
Loading…
Reference in New Issue