Created
December 3, 2020 17:31
-
-
Save mlabbe/d868314ed498ccb49a3f9799fd158bdc to your computer and use it in GitHub Desktop.
yasnippet disable a region with #if 0
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: ifdef-disable | |
# key: ifdef-disable | |
# binding: M-# | |
# expand-env: ((yas-wrap-around-region nil)) | |
# -- | |
#if 0 | |
`yas-selected-text`#else | |
$0 | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gif of snippet in action https://twitter.com/frogtoss/status/1334551339100061696