Skip to content

Instantly share code, notes, and snippets.

@mlabbe
Created December 3, 2020 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mlabbe/d868314ed498ccb49a3f9799fd158bdc to your computer and use it in GitHub Desktop.
Save mlabbe/d868314ed498ccb49a3f9799fd158bdc to your computer and use it in GitHub Desktop.
yasnippet disable a region with #if 0
# -*- 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
@mlabbe
Copy link
Author

mlabbe commented Dec 3, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment