Last active
November 14, 2018 10:37
-
-
Save knu/fd795064af2b32d3c1f1058b24e6429a to your computer and use it in GitHub Desktop.
Yasnippet: block-with-var for ruby-mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: snippet -*- | |
# name: block-with-var | |
# -- | |
{ |${1:var}| ${1:$(if (string-match "\\\\_<[a-z]\\\\sw*" yas-text) (match-string 0 yas-text))}.$0 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment