feat(emacs): binding to CTRL-; to add semi colon at the end of the line
Now in insert mode when editing you can add a semi colon at the end of the current line my pressing CTRL-;. This will then put the cursor after that ready to continue the line or press enter to start a new line. This is inspired by some old vim key bindings I had and a vscode plugin called coloniser.
This commit is contained in:
parent
8df6f7e798
commit
471fb9168d
1 changed files with 8 additions and 1 deletions
|
|
@ -6,6 +6,11 @@
|
|||
;; licence that can be found in the LICENCE file or at
|
||||
;; https://www.practically.io/copyright/
|
||||
|
||||
(defun aa/semicolon-at-end-of-line ()
|
||||
(interactive)
|
||||
(end-of-line)
|
||||
(insert ";"))
|
||||
|
||||
(use-package evil
|
||||
:init
|
||||
(setq evil-want-integration t)
|
||||
|
|
@ -21,7 +26,9 @@
|
|||
(global-set-key (kbd "C-k") 'evil-window-up)
|
||||
|
||||
(evil-set-initial-state 'messages-buffer-mode 'normal)
|
||||
(evil-set-initial-state 'dashboard-mode 'normal))
|
||||
(evil-set-initial-state 'dashboard-mode 'normal)
|
||||
|
||||
(define-key evil-insert-state-map (kbd "C-;") 'aa/semicolon-at-end-of-line))
|
||||
|
||||
(use-package evil-collection
|
||||
:after evil
|
||||
|
|
|
|||
Loading…
Reference in a new issue