Last active
December 14, 2015 04:08
-
-
Save maelvls/5025582 to your computer and use it in GitHub Desktop.
Some snippets I added to my "c.snippets". For snipMate (VIM)
This file contains hidden or 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
## Brackets | |
# Because I wanted a convenient way to reproduce the Xcode behaviour when {-returning | |
snippet { | |
{ | |
${1} | |
} | |
## Comments | |
# to make it easier to comment my work | |
snippet /* | |
/* ${1} */ | |
# Comments 2 | |
# A "flag" comment | |
snippet /*= | |
/* ============ ${1} ============ */ | |
## while | |
# It was bound on the "wh" before, not really helpful when you have | |
# some identifiers having the same first two letters... | |
# Really convenient though with Supertab completing | |
snippet while | |
while (${1:/* condition */}) { | |
${2:/* code */} | |
}${3} | |
## Printf, scanf | |
# I renamed them both | |
snippet printf | |
printf("${1:%s}\n"${2});${3} | |
snippet scanf | |
scanf("${1:%d}",&${2});${3} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment