SLY: Bind sly-insert-cmd to C-return.
parent
3d1f4ff079
commit
eb41e59208
|
@ -183,6 +183,15 @@ GUIX-COMMAND is the command to the guix executable, e.g. '(\"~/projects/guix/pre
|
|||
(global-helm-sly-mode)
|
||||
(add-to-list 'helm-source-names-using-follow "Lisp xrefs"))
|
||||
|
||||
(defun ambrevar/sly-insert-cmd ()
|
||||
"Convenient to call commands."
|
||||
(interactive)
|
||||
(insert "(cmd:cmd \"\")")
|
||||
(backward-char 2)
|
||||
(when (and (boundp 'evil-state)
|
||||
(not (eq evil-state 'insert)))
|
||||
(call-interactively #'evil-insert)))
|
||||
|
||||
(defun ambrevar/sly-insert-double-quotes ()
|
||||
"Convenient to write list of string, e.g. when writing a shell command line."
|
||||
(interactive)
|
||||
|
@ -219,6 +228,7 @@ GUIX-COMMAND is the command to the guix executable, e.g. '(\"~/projects/guix/pre
|
|||
(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)
|
||||
(define-key sly-mrepl-mode-map (kbd "C-S-SPC") 'ambrevar/sly-insert-pipe)
|
||||
(define-key sly-mrepl-mode-map (kbd "<C-return>") 'ambrevar/sly-insert-cmd)
|
||||
;; Glyphs
|
||||
(define-key sly-mrepl-mode-map (kbd "M-l") 'ambrevar/insert-lambda)
|
||||
(define-key sly-mrepl-mode-map (kbd "M-f") 'ambrevar/insert-cursive-f)
|
||||
|
|
Loading…
Reference in New Issue