beiklive's blog beiklive's blog
首页
  • 语言学习

    • C/C++
    • Python
    • Qt
  • 系统&引擎

    • Linux
    • Godot
  • 啥都学

    • 夏姬八学
    • 好好学习
  • 折腾记录

    • 树莓派
    • Obsidian
    • 实践记录
  • 技术文档
  • 工具网站
  • Github项目
  • 友情链接
  • 关于
  • 分类
  • 标签
  • 归档
GitHub (opens new window)

beiklive

全沾艺人
首页
  • 语言学习

    • C/C++
    • Python
    • Qt
  • 系统&引擎

    • Linux
    • Godot
  • 啥都学

    • 夏姬八学
    • 好好学习
  • 折腾记录

    • 树莓派
    • Obsidian
    • 实践记录
  • 技术文档
  • 工具网站
  • Github项目
  • 友情链接
  • 关于
  • 分类
  • 标签
  • 归档
GitHub (opens new window)
  • Git
  • vscode
    • C/C++相关
    • CPP自用
  • xmake
  • Note_Record
beiklive
2024-05-07
目录

vscode

前一篇

01.Git

# 键盘快捷方式

# C/C++相关

前置: 需要安装 C/C++插件

image.png

# 用户代码片段

# CPP自用

{


    "Add C include guard": {
        "scope": "c",
        "prefix": "cheader",
        "description": "Add include guard to C header file",
        "body": [
         "// Copyright (c) RealCoolEngineer. $CURRENT_YEAR. All rights reserved.",
         "// Author: beiklive",
         "// Date: $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE",
         "",
        ]
       },

    "C/C++头文件": {
        "scope": "",
        "prefix": "#iff",
        "body": [
            "// Copyright (c) RealCoolEngineer. $CURRENT_YEAR. All rights reserved.",
            "// Author: beiklive",
            "// Date: $CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE",
            "#ifndef ${RELATIVE_FILEPATH/([a-zA-Z0-9]+)([\\/\\.-_])?/${1:/upcase}_/g}",
            "#define ${RELATIVE_FILEPATH/([a-zA-Z0-9]+)([\\/\\.-_])?/${1:/upcase}_/g}",
            "$1",
            "#endif  // ${RELATIVE_FILEPATH/([a-zA-Z0-9]+)([\\/\\.-_])?/${1:/upcase}_/g}",
            ""
        ],
        "description": "生成预定义宏"
    },
    ".cpp": {
        "prefix": "cc",
        "body": [
            "${TM_FILENAME_BASE}::"
        ],
        "description": "根据文件名生成命名空间名字"
    }

}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
编辑 (opens new window)
#vscode
上次更新: 2024/05/20, 13:09:02
Git
xmake

← Git xmake→

最近更新
01
爬虫技术与法律风险:个人开发者的注意事项
05-22
02
个人开发者的抉择:个人工作室 vs 公司主体 🤔
05-22
03
《计算机网络,自顶向下方法》笔记(一)
05-20
更多文章>
Theme by Vdoing | Copyright © 2024-2024 beiklive | 苏ICP备20038092号-2
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式