Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Your snippets
- #
- # Atom snippets allow you to enter a simple prefix in the editor and hit tab to
- # expand the prefix into a larger code block with templated values.
- #
- # You can create a new snippet in this file by typing "snip" and then hitting
- # tab.
- #
- # An example CoffeeScript snippet to expand log to console.log:
- #
- # '.source.coffee':
- # 'Console log':
- # 'prefix': 'log'
- # 'body': 'console.log $1'
- #
- # Each scope (e.g. '.source.coffee' above) can only be declared once.
- #
- # This file uses CoffeeScript Object Notation (CSON).
- # If you are unfamiliar with CSON, you can read more about it in the
- # Atom Flight Manual:
- # http://flight-manual.atom.io/using-atom/sections/basic-customization/#_cson
- '.source.python':
- 'ipdb':
- 'prefix': 'teste'
- 'body': 'teste'
- '.source.c':
- 'printf':
- 'prefix': 'pr'
- 'body': 'printf("%$1",$2);$3'
- 'scanf':
- 'prefix': 'sc'
- 'body': 'scanf("%$1",&$2);$3'
- 'for loop':
- 'prefix': 'for'
- 'body': '''for( int $1 = 0; $1 < $2; $1++){
- $3
- }'''
- 'if':
- 'prefix': 'if'
- 'body': '''if($1){
- $2
- }'''
- 'elseif':
- 'prefix': 'ei'
- 'body': '''elseif($1){
- $2
- }'''
- 'else':
- 'prefix': 'el'
- 'body': '''else{
- $1
- }'''
- 'strings library':
- 'prefix': 'str'
- 'body': '#include <string.h>'
- 'main':
- 'prefix': 'main'
- 'body': '''#include <stdio.h>
- int main(){
- $1
- return 0;
- }'''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement