VScode 插件

vscode debug python:

https://vscode-debug-specs.github.io/python/

vscode debug cpp:

https://vscode-debug-specs.github.io/cpp/

 

1.markdown all in one, markdown preview enhanced

语法参考:

https://shd101wyy.github.io/markdown-preview-enhanced/#/zh-cn/markdown-basics

公式参考:

https://zhuanlan.zhihu.com/p/138532124

https://blog.csdn.net/katherine_hsr/article/details/79179622

1.1 Markdown PDF插件—— .md文件转pdf

 

2.latex

https://zhuanlan.zhihu.com/p/136209984

 

3.Cmake,Cmake Tool

 

4.draw.io integration

 

5.ros

 

6. visual studio intellicode

 

7.vscode-icons

 

8.yaml

 

9.debug 无法显示STL数据,只能显示地址,解决方法:

https://blog.csdn.net/yanxiangtianji/article/details/80579236

 

10.Python +

  • code runner——键运行文件的代码执行插件,只需在文件中右键然后点击run code

 

11.Debug Eigen in vscode 

  • 下载文件printers.py到目录/home/<use>/gdbExtensions/。文件地址:https://gitlab.com/libeigen/eigen/-/blob/master/debug/gdb/printers.py
wget -P ~/gdbExtensions/ "https://bitbucket.org/eigen/eigen/raw/default/debug/gdb/printers.py"
touch ~/gdbExtensions/__init__.py
  • 将以下内容写入.gdbinit
echo -en "\
python \n\
import sys \n\
sys.path.insert(0, '/home/<USER>/gdbExtensions') \n\
from printers import register_eigen_printers \n\
register_eigen_printers (None) \n\
end\n" >> ~/.gdbinit
  • 重新打开VScode开始debug

 

12. 代码注释:korofileheader

{
    "workbench.iconTheme": "vscode-icons",
    "explorer.confirmDelete": false,
    "debug.onTaskErrors": "showErrors",
    "cmake.configureOnOpen": true,
    "functionWideNum": 12,
    "files.associations": {
        "*.json": "jsonc"
    },
    "fileheader.configObj": {
        "autoAdd": false, // 默认关闭
        "wideSame": true, // 设置为true开启
        "wideNum": 13,   // 字段长度 默认为13
        "fileheader.Author": "san.zhang",
        "fileheader.LastModifiedBy": "san.zhang",
      },
    "explorer.confirmDragAndDrop": false,
    "diffEditor.ignoreTrimWhitespace": false,
    
    // 文件头部注释
    "fileheader.customMade": {
        "custom_string_obkoro1_copyright": "Copyright ${now_year} name, Inc. All Rights Reserved. ",
        "Author": "zhangsan@qq.com",
        "Group": "name",
        "Date": "Do not edit",          // 设置后默认设置文件生成时间
        "LastEditTime": "Do not edit",  // 设置后,保存文件更改默认更新最后编辑时间
        "Description":"",
    },
    //函数注释
    "fileheader.cursorMode": {
        "Description":"",
        "param":"",
        "return":""
    }

}

 

13.cpplint

安装:sudo pip install cpplint

vscode插件:cpplint

配置:

"cpplint.filters": [
"-build/c++11 ",
"-build/include_alpha,+build/include_order ",
"+build/include_what_you_use ",
"-build/header_guard ",
"+runtime/printf,+runtime/printf_format ",
"-legal ", //屏蔽[legal/copyright]告警
],
"cpplint.lineLength": 120,
"cpplint.includeorder":"standardcfirst",

 

14.cppcheck

安装cpp-check-lint 

# cppcheck-2.7.tar.gz
sudo wget https://github.com/danmar/cppcheck/archive/refs/tags/2.7.tar.gz # cmake
mkdir build
cd build
cmake ..
make CFGDIR=/usr/share/cppcheck/ -j 8
sudo make install CFGDIR=/usr/share/cppcheck/ -j 8

配置C-cpp-flylint > Cppcheck:Executable:

"c-cpp-flylint.cppcheck.executable": "your_dir/build/bin/cppcheck",
    "c-cpp-flylint.cppcheck.suppressions":[
        "useStlAlgorithm",
        "syntaxError",
        "constStatement",
        "invalidContainer",
    ],
    "c-cpp-flylint.flexelint.enable":false,
    "c-cpp-flylint.lizard.enable":false,
    "c-cpp-flylint.flawfinder.enable":false,

  

14.clang-format

 

15.ssh remote

删除云端的.vscode-server(太大了)之后,再也链接不上了:按照commitID 重新下载(
https://update.code.visualstudio.com/commit:YourCommitID/server-linux-x64/stable
)一个部署到云端的用户目录下 
cd ~/.vscode-server/bin,解压

 

16.preview_video.html + Live Preview插件,预览视频文件

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <style>
        * {
            background-color: #333;
            color: #fff;
            list-style: none;
            margin: 0;
            padding: 0;
            cursor: default;
            overflow: hidden;
        }

        /* video {
            width: 100%;
            height: 100%;
        } */
    </style>
</head>

<body>
    <video id="video" type="video/mp4" controls="controls" preload="true" src="./1957.mp4" type="video/mp4">
    </video>
</body>

</html>

 

posted @ 2021-05-19 15:53  寒江小筑  阅读(397)  评论(0编辑  收藏  举报