@SiberiaBear
2016-03-29T11:06:57.000000Z
字数 1308
阅读 3011
软件配置
关于ATOM编辑器中插件:
snippets的配置文档。snippets是一个自动补全插件,在ATOM中默认是不安装的,需要安装该插件,并找到snippets.cson这个文件来配置如下。
# 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:# https://atom.io/docs/latest/using-atom-basic-customization#cson'.source.c':'Console if':'prefix': 'if''body': """if ( ${1:<condition>} ) {${2:<body>}}"""'Console while':'prefix': 'while''body': """while ( ${1:<condition>} ) {${2:<body>}}"""'Console for':'prefix': 'for''body': """for ( ${1:<condition1>}; ${2:<condition2>}; ${3:<condition3>}) {${4:<body>}}"""'Console switch':'prefix': 'switch''body': """switch ( ${1:<condition>} ) {case ${2:<case1>} : ${3:<body1>}break;case ${4:<case2>} : ${5:<body2>}break;default : ${6:<body3>}break;}"""'Console include':'prefix': '#include''body': '#include ${1:<include>}''Console define':'prefix': '#define''body': '#define ${1:<define>}'