Klimi's new dotfiles with stow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
229 B

5 years ago
  1. # -*- mode: snippet -*-
  2. # name: switch (...) { case : ... default: ...}
  3. # key: switch
  4. # --
  5. switch (${1:expr}) {
  6. case ${2:constexpr}:${3: \{}
  7. $0
  8. break;
  9. ${3:$(if (string-match "\{" yas-text) "\}\n" "")}default:
  10. break;
  11. }