snippets for c code
{
// Place your 全域性 snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
// 建立C
"Cireat a C file ":{
"prefix": "fileC", //在新建立的頁面中輸入C++就會有智慧提示,Tab就自動生成好了
"body": [
"/*"
" * 六瓜程式設計 2010-2020 @date: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}"
" * author : XiaoShengYang"
"*/"
"", //空行
"#include <stdbool.h>"
"", //空行
"$0", //最終游標會在這裡等待輸入
],
"description": "A C file template." //使用者輸入後智慧提示的內容(你可以用中文寫“生成C++模板”)
}
// 建立H
"Cireat a H file ":{
"prefix": "fileH", //在新建立的頁面中輸入C++就會有智慧提示,Tab就自動生成好了
"body": [
"/*******************************************************************************"
"* company : 六瓜程式設計 2010-2020"
"* description: $1"
"* date: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}",
"* author : XiaoShengYang"
"*******************************************************************************/"
"", //空行
"#ifndef __${TM_FILENAME/(.*)/${1:/upcase}/}"
"#define __${TM_FILENAME/(.*)/${1:/upcase}/}"
"#include <stdbool.h>"
"", //空行
"$0", //最終游標會在這裡等待輸入
"#endif",
],
"description": "A H file template." //使用者輸入後智慧提示的內容(你可以用中文寫“生成C++模板”)
}
// 建立fun
"Cireat a function ":{
"prefix": "function", //在新建立的頁面中輸入C++就會有智慧提示,Tab就自動生成好了
"body": [
"static$4 void$3 $1( void$2 )",
"{",
"\t$0",
"}",
],
"description": "A function template." //使用者輸入後智慧提示的內容(你可以用中文寫“生成C++模板”)
}
// 建立註釋
"Cireat a anote ":{
"prefix": "anote", //在新建立的頁面中輸入C++就會有智慧提示,Tab就自動生成好了
"body": [
"",
"\t/* $1 */",
"\t$0",
],
"description": "A function template." //使用者輸入後智慧提示的內容(你可以用中文寫“生成C++模板”)
}
// 建立結構體
"Cireat a typedef struct ":{
"prefix": "typedef struct", //在新建立的頁面中輸入C++就會有智慧提示,Tab就自動生成好了
"body": [
"typedef struct _$1_t",
"{",
"\tu8 x;",
"\tu8 y$2;",
"}$1_TypeDef;",
"$0",
],
"description": "A typedef struct template." //使用者輸入後智慧提示的內容(你可以用中文寫“生成C++模板”)
}
// 建立列舉
"Cireat a typedef enum ":{
"prefix": "typedef enum", //在新建立的頁面中輸入C++就會有智慧提示,Tab就自動生成好了
"body": [
"typedef enum _$1_t",
"{",
"\tRED = 0,",
"\tBLACK$2,",
"}$1_TypeDef;",
"$0",
],
"description": "A typedef struct template." //使用者輸入後智慧提示的內容(你可以用中文寫“生成C++模板”)
}
}
相關文章
- Xcode-Snippets/Objective-C 學習XCodeObject
- xcode Code Snippets Library的使用XCode
- Sublime Text3—Code Snippets(自定義程式碼片段)
- javascript tips and snippetsJavaScript
- 從VS 2005提供Code Snippets功能看程式碼複用
- Sublime 的 Snippets 快捷片段
- CSS/LESS tips and snippetsCSS
- VS Code 折騰記 - (10) 你想釋出自己搗鼓的snippets到VSCode外掛市場!VSCode
- 重複程式碼的剋星,高效工具 VSCode snippets 的使用指南VSCode
- 【VSC】Snippets不完全指南
- 精讀《react-snippets - Router 原始碼》React原始碼
- VSCode JavaScript snippets for Dynamics 365/CRM 2011/2013/2015/2016VSCodeJavaScript
- C# Code SummaryC#
- oracle sqldeveloper下 自定義Snippets檔案的替換OracleSQLDeveloper
- 在Java中反轉字串的10種方法[Snippets]Java字串
- TscanCode C/C++靜態分析C++
- 用code::blocks寫C/C++程式BloCC++
- VS Code C/C++ 環境配置C++
- c#練手codeC#
- nowcoder 五 C
- codeforce 447C
- Code-CSDN-C++-圖C++
- vscode之C配置VSCode
- C# Unicode編碼C#Unicode
- BestCoder Round #20 B,C
- Visual Studio Code (vscode) 配置C、C++環境/編寫執行C、C++(Windows)【真正的小白版】VSCodeC++Windows
- VsCode配置C/C++開發環境VSCodeC++開發環境
- VSCODE 配置 C/C++ 開發環境VSCodeC++開發環境
- Solution - Atcoder Atcoder ARC137C Distinct Numbers
- XCode 中 Swift / Objective-C / C / C++ 混合程式設計XCodeSwiftObjectC++程式設計
- VS Code除錯C程式碼除錯C程式
- Codeforces Round #469 C A. Zebras
- Codeforces Round #399 (A,B,C)
- Codeforces466C Number of Ways
- VS Code配置C++環境C++
- Ubuntu中用VScode編譯除錯C\C++UbuntuVSCode編譯除錯C++
- AtCoder題解 —— AtCoder Beginner Contest 183 —— C - Travel
- codeforces 514C Watto and Mechanism