日常效率工具【Tools】
- VScode
- vscode原理(居然和Chrome同源)
- Chromium(Chrome开源版)
- node.js:让JavaScript可以运行在wab之外的环境
- 配置文件
- setting.jesn
- vscode快捷键万事不求人(Ctrl +K,Ctrl +S)
- vscode修改光标所在行的背景色
- Generate Doxygen Comments
- 让Arduino或者其他三方库可以在vscode中自由穿行
- Terminal中文乱码问题
- 标签换行
- Outline Map
- GitLens
- GNU Linker Map files
- Hex Editor
- LinkerScript
- highlight words
- Bookmarks
- Blockman
- WinMerge(windows中BeyondCompare代替)
- Ghidra
- Windows系统在鼠标右键添加CMD命令
- 1.手动方式添加
- a.WIN+R,输入regedit,
- b.右键目录时菜单显示进入命令行选项
- 2.脚本方式添加
- 基础版
- 层级式
- 作用域
- 变量(一)
- 变量(二)
- 支持一下
-
VScode
-
vscode原理(居然和Chrome同源)
基于
Electron
框架,使用JavaScript
、Node.js
、CSS
和HTML
技术编写。
1.Electron
:用于让开发者构建跨平台的桌面应用程序,允许开发者使用 web 技术(JavaScript、HTML 和 CSS
)来构建跨平台的桌面应用程序。
2.Electron
=Chromium
+Node.js
。
3.Chromium
=Web
浏览器环境
4.Node.js
=在Electron
中主要用于提供本地系统访问的功能,在Electron
中可以使用Node.js
来访问文件系统、网络服务和其他系统功能
。Node.js
还可以提供一些JavaScript模块
,使得开发者可以更加快速地开发应用程序
Chromium
的架构包括:内核
(Kernel)、渲染器
(Renderer)、多媒体框架
(Multimedia Framework)、浏览器引擎
(Browser Engine)、插件
(Plugins)、数据存储
(Data Storage)以及其他组件。
1Kernel
主要负责管理Chromium
的运行,
2.Renderer
负责渲染HTML和JavaScript
,(多个进程(页面))
3.Multimedia Framework
负责提供音频和视频播放功能,
4.Browser Engine
负责处理网页请求,( 主进程 )
5.Plugins
负责为Chromium
提供插件,
6.Data Storage
负责存储数据。
文件名 | 作用 |
---|---|
settings.json | IDE编辑器的一些特性 |
c_cpp_properties.json | c/c++编译器、包含路径等特性 |
compile_commands.json | 生成编译数据库,快速编译 |
launch.json | 调试的一些特性 |
tasks.json | gcc编译汇总 |
{
"idf.gitPathWin": "c:\\Users\\janki\\esp\\TOOLS\\tools\\idf-git\\2.30.1\\cmd\\git.exe",
"idf.espIdfPathWin": "C:\\Users\\janki\\esp\\esp-idf",
"idf.pythonBinPathWin": "C:\\Users\\janki\\esp\\tools\\python_env\\idf4.4_py3.8_env\\Scripts\\python.exe",
"idf.toolsPathWin": "C:\\Users\\janki\\esp\\tools",
"idf.customExtraPaths": "C:\\Users\\janki\\esp\\tools\\tools\\xtensa-esp32-elf\\esp-2021r2-patch3-8.4.0\\xtensa-esp32-elf\\bin;C:\\Users\\janki\\esp\\tools\\tools\\xtensa-esp32s2-elf\\esp-2021r2-patch3-8.4.0\\xtensa-esp32s2-elf\\bin;C:\\Users\\janki\\esp\\tools\\tools\\xtensa-esp32s3-elf\\esp-2021r2-patch3-8.4.0\\xtensa-esp32s3-elf\\bin;C:\\Users\\janki\\esp\\tools\\tools\\riscv32-esp-elf\\esp-2021r2-patch3-8.4.0\\riscv32-esp-elf\\bin;C:\\Users\\janki\\esp\\tools\\tools\\esp32ulp-elf\\2.28.51-esp-20191205\\esp32ulp-elf-binutils\\bin;C:\\Users\\janki\\esp\\tools\\tools\\esp32s2ulp-elf\\2.28.51-esp-20191205\\esp32s2ulp-elf-binutils\\bin;C:\\Users\\janki\\esp\\tools\\tools\\cmake\\3.20.3\\bin;C:\\Users\\janki\\esp\\tools\\tools\\openocd-esp32\\v0.11.0-esp32-20211220\\openocd-esp32\\bin;C:\\Users\\janki\\esp\\tools\\tools\\ninja\\1.10.2;C:\\Users\\janki\\esp\\tools\\tools\\idf-exe\\1.0.3;C:\\Users\\janki\\esp\\tools\\tools\\ccache\\4.3\\ccache-4.3-windows-64;C:\\Users\\janki\\esp\\tools\\tools\\dfu-util\\0.9\\dfu-util-0.9-win64",
"idf.customExtraVars": "{\"OPENOCD_SCRIPTS\":\"C:\\\\Users\\\\janki\\\\esp\\\\tools\\\\tools\\\\openocd-esp32\\\\v0.11.0-esp32-20211220/openocd-esp32/share/openocd/scripts\",\"IDF_CCACHE_ENABLE\":\"1\"}"
}
-
vscode快捷键万事不求人(Ctrl +K,Ctrl +S)
-
-
vscode修改光标所在行的背景色
"workbench.colorCustomizations": {
"editor.lineHighlightBackground": "#008c8c5f",//修改光标所在行的背景色
"editor.lineHighlightBorder": "#ffffff30" //修改光标所在行的边框色
}
{
// Doxygen documentation generator set
// 文件注释:版权信息模板
"doxdocgen.file.copyrightTag": [
"@copyright Copyright (c) {year} XX通信公司"
],
// 文件注释:自定义模块,这里我添加一个修改日志
"doxdocgen.file.customTag": [
"@par 修改日志:",
"<table>",
"<tr><th>Date <th>Version <th>Author <th>Description",
"<tr><td>{date} <td>1.0 <td>wangh <td>内容",
"</table>",
],
// 文件注释的组成及其排序
"doxdocgen.file.fileOrder": [
"file", // @file
"brief", // @brief 简介
"author", // 作者
"version", // 版本
"date", // 日期
"empty", // 空行
"copyright",// 版权
"empty",
"custom" // 自定义
],
// 下面时设置上面标签tag的具体信息
"doxdocgen.file.fileTemplate": "@file {name}",
"doxdocgen.file.versionTag": "@version 1.0",
"doxdocgen.generic.authorEmail": "wanghuan3037@fiberhome.com",
"doxdocgen.generic.authorName": "wangh",
"doxdocgen.generic.authorTag": "@author {author} ({email})",
// 日期格式与模板
"doxdocgen.generic.dateFormat": "YYYY-MM-DD",
"doxdocgen.generic.dateTemplate": "@date {date}",
// 根据自动生成的注释模板(目前主要体现在函数注释上)
"doxdocgen.generic.order": [
"brief",
"tparam",
"param",
"return"
],
"doxdocgen.generic.paramTemplate": "@param{indent:8}{param}{indent:25}My Param doc",
"doxdocgen.generic.returnTemplate": "@return {type} ",
"doxdocgen.generic.splitCasingSmartText": true,
}
当在文件头部输入
/**
后回车、在函数上面/**
后回车
/**
* @brief @param @return @author @date @version是代码书写的一种规范
* @brief :简介,简单介绍函数作用
* @param :介绍函数参数
* @return:函数返回类型说明
* @exception NSException 可能抛出的异常.
* @author zhangsan: 作者
* @date 2011-07-27 22:30:00 :时间
* @version 1.0 :版本
* @property :属性介绍
* */
"C_Cpp.default.includePath": [
"C:\\Users\\admin\\AppData\\Local\\Arduino15\\**",
"C:\\Users\\admin\\Documents\\Arduino\\libraries\\**"
]
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [
"/K",
"chcp 65001" //936 :gb2312 ,65001:utf-8
],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash"
}
参考:VSCode终端和Windows Terminal中文UTF-8乱码解决方案
workbench.editor.wrapTabs
-
Outline Map
-
GitLens
-
GNU Linker Map files
-
Hex Editor
-
LinkerScript
-
highlight words
-
Bookmarks
可以对代码行进行标记,对标记的行进行跳转
-
Blockman
效果如下,可以将代码层次结构显示出来
-
WinMerge(windows中BeyondCompare代替)
官网:https://winmerge.org 👈
Ghidra
由NSA发布的类似于IDA的软件基于Java
参考👉NSA开源逆向工具Ghidra入门使用教程
笔者学习汇编时开发一个插件在:Ghidra comment add script
-
Windows系统在鼠标右键添加CMD命令
1.手动方式添加
-
a.WIN+R,输入regedit,
依次展开HKEY_CLASSES_ROOT\DesktopBackground\Shell\cmd,添加cmd项,修改默认值为 cmd.exe /s /k pushd “%V” -
b.右键目录时菜单显示进入命令行选项
依次展开 HKEY_CLASSES_ROOT\Directory\shell\cmd\command,添加cmd-command,修改默认值
2.脚本方式添加
添加CMD到右键菜单脚本
准备context-batch.bat、运行to_Right_Click_menu.regWindows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\Run script] @="&Run Script" [HKEY_CLASSES_ROOT\*\shell\Run script\command] @="\"H:\\BATCH_FILE_PATH\\context-batch.bat\" \"%1\""
参考:Windows: How to add batch-script action to Right Click menu
######################### ### Registry file text follows ### ######################### Windows Registry Editor Version 5.00 ; Created by: jschlie70 ; Created on: 2023-12-26 [HKEY_CLASSES_ROOT\Directory\shell\CmdShell] "ExtendedSubCommandsKey"="Directory\\ContextMenus\\CmdShell" "Icon"="C:\\Windows\\System32\\cmd.exe" "MUIVerb"="&CMD" [HKEY_CLASSES_ROOT\Directory\ContextMenus\CmdShell] [HKEY_CLASSES_ROOT\Directory\ContextMenus\CmdShell\shell] [HKEY_CLASSES_ROOT\Directory\ContextMenus\CmdShell\shell\opencmd] "Icon"="C:\\Windows\\System32\\cmd.exe" "MUIVerb"="Open &Here" [HKEY_CLASSES_ROOT\Directory\ContextMenus\CmdShell\shell\opencmd\command] @="cmd.exe /s /k pushd "%V"" [HKEY_CLASSES_ROOT\Directory\ContextMenus\CmdShell\shell\runas] "HasLUAShield"="" "Icon"="C:\\Windows\\System32\\cmd.exe" "MUIVerb"="Open here as &Administrator" [HKEY_CLASSES_ROOT\Directory\ContextMenus\CmdShell\shell\runas\command] @="cmd.exe /s /k pushd "%V"" [HKEY_CLASSES_ROOT\Drive\shell\CmdShell] "ExtendedSubCommandsKey"="Directory\\ContextMenus\\CmdShell" "Icon"="C:\\Windows\\System32\\cmd.exe" "MUIVerb"="&CMD"
参考:Add CMD Sub-Menu to Context Menu - With Run as Administrator
-
作用域
添加到 Windows 注册表:
- 对于文件夹上下文菜单:(在资源管理器窗口中右键单击文件夹)
powershell -WindowStyle Hidden "start cmd \"/k cd /d %1\" -v runAs"
- 对于背景上下文菜单:(右键单击资源管理器窗口的背景):
powershell -WindowStyle Hidden "start cmd \"/k cd /d %V\" -v runAs"
- 对于文件上下文菜单:(在资源管理器窗口中右键单击文件):
powershell -WindowStyle Hidden "start cmd \"/k cd /d %w\" -v runAs"
参考:Which special variables are available when writing a shell command for a context menu
- 对于文件夹上下文菜单:(在资源管理器窗口中右键单击文件夹)
-
变量(一)
I
每次尝试都返回一组不同的数字。H
始终为 0,S
始终为 1。D
、L
和V
均为目标文件夹。W
是目标文件夹的父文件夹。`
是分隔符.[HKEY_CLASSES_ROOT\Directory\shell\testcmd] @="Test Command Window Directory" [HKEY_CLASSES_ROOT\Directory\shell\testcmd\command] @="cmd.exe /k \"echo %A`%B`%C`%D`%E`%F`%G`%H`%I`%J`%K`%L`%M`%N`%O`%P`%Q`%R`%S`%T`%U`%V`%W`%X`%Y`%Z\""
在
C:\iso
下执行的结果:D = C:\iso H = 0 I = :115057472:7932 L = C:\iso S = 1 V = C:\iso W = C:\
?:Did you right click in the folder, or on the folder?
【您是在文件夹中单击鼠标右键,还是在文件夹上单击鼠标右键?】
【%V
如果您想要目录名称,则应该使用它,即当您单击背景时想要在上下文菜单上添加命令,而不是在单个文件或目录名称上添加命令。%L
在这种情况下将不起作用。】
参考:Which special variables are available when writing a shell command for a context menu -
变量(二)
other command line variables
// %* - replace with all parameters
// %~ - replace with all parmaters starting with and following the second parameter
// %0 or %1 the first file parameter. For example “C:\Users\Eric\Destop\New Text Document.txt”. Generally this should be in quotes and the applications command line parsing should accept quotes to disambiguate files with spaces in the name and different command line parameters (this is a security best practice and I believe mentioned in MSDN).
// % (where N is 2 - 9), replace with the nth parameter
// %s – show command
// %h – hotkey value
// %i – IDList stored in a shared memory handle is passed here.
// %l – long file name form of the first parameter. Note win32 applications will be passed the long file name, win16 applications get the short file name. Specifying %L is preferred as it avoids the need to probe for the application type.
// %d – desktop absolute parsing name of the first parameter (for items that don’t have file system paths)
// %v – for verbs that are none implies all, if there is no parameter passed this is the working directory【空点背景时获取工作目录?】
// %w – the working directory
参考:
Extending Shortcut Menus
Windows NT 4/Windows 2000 Syntax
-