Add < surround key

ysiw<testRET will transform

  String

To

  test<String>

In C-style major modes that use angle bracket generics/templates (e.g.
C++, rust, C#, java, swift, and typescript).
This commit is contained in:
Henrik Lissner 2019-07-12 01:07:23 +02:00
parent fb16afb4f2
commit 403c2e1b5d
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 18 additions and 0 deletions

View file

@ -31,3 +31,9 @@
(defun +evil--embrace-elisp-fn ()
"Elisp function support for embrace."
(cons (format "(%s " (or (read-string "(") "")) ")"))
;;;###autoload
(defun +evil--embrace-angle-brackets ()
"Type/generic angle brackets."
(cons (format "%s<" (or (read-string "") ""))
">"))