vscode+cygwin

Cygwin 、C/C++

Windows下安装Cygwin,配置gdb:https://jingyan.baidu.com/article/4f34706e0acca9e387b56dfe.html
注意事项:
    1、安装位置 C:\cygwin64
    2、User URL http://mirrors.163.com/cygwin/
            安装:gcc-core,gcc-g++, make ,gdb
    3、配置环境变量(即gdb.exe的位置) C:\cygwin64\bin

安装vscode

vscode+cygwin_第1张图片


Astyle 代码格式化: https://blog.csdn.net/dashumak/article/details/82355745

"C:\Program Files\AStyle_3.1_windows\AStyle\bin\AStyle.exe" --style=allman -k3 -W1 -xG -S -s4 -xb -U -p -xf -xh -xC120 -xL -H -Y -xW -w -n %f
Source Insight 4.0配置格式化工具AStyle.exe:https://blog.csdn.net/redeagle_gbf/article/details/81566871

1、配置环境变量:F:\AStyle_3.1_windows\AStyle\bin
2、File --> References --> Settings --> 输入astyle.cmd_options
vscode+cygwin_第2张图片

{
    "astyle.additional_languages": [
        "c",
        "cpp",
    ],
    "astyle.cmd_options": [
        "--style=kr",//Kernighan&Ritchie 风格格式和缩进
        "--indent=spaces=4",//缩进4个空格
        "--convert-tabs",
        "--align-pointer=name",
        "--align-reference=name",
        "--keep-one-line-statements",
        "--pad-header",
        "--pad-oper",//操作符两端插入一个空格
    ],
}

快捷键

vscode+cygwin_第3张图片

你可能感兴趣的:(vscode)