下载submodules
// 注入js生成下载列表
{
const buffer = [];
let i = 1;
// 清华大学镜像站
for(let a of document.querySelectorAll("#list td.link > a")) {
const href = a.href;
if ("../" === href) continue;
const isDir = href.endsWith("/");
if(!isDir) {
if(!a.innerText.startsWith("*")) {
a.innerText = `* ${i++}: ${a.innerText}`;
}
buffer.push(`wget ${href}`)
}
}
console.log(buffer.join("\n"));
}
AStyle缩进
- 下载AStyle
Qt Creator
、About Plugins
、启用Beautifier
Qt Creator
、Tools
、Options
、Beautifier
、
General
、Enable auto format on file save
Artistic Style
、Options
、Use customed style
、输入以下内容
--style=java
--mode=c
--convert-tabs # Tab 转 Space
--indent=spaces=4 # 缩进长度 4
--indent-modifiers # 整体缩进 public、protected、private:
--indent-switches # 整体缩进 switch
--indent-cases # 整体缩进 case
--indent-namespaces # 整体缩进 namespace
--indent-col1-comments # 缩进顶行开始的注释
--indent-preprocessor # 缩进宏
--pad-oper # 操作符 前后填充空格
--pad-comma # 逗号 前后填充空格
#--pad-paren # 括号 前后填充空格
--pad-header # 关键字附近括号 前后填充空格
--unpad-paren # 删除多余的空格
--align-pointer=type # 指针贴近类型(int* p)
--align-reference=type # 引用贴近类型(int& p)
--add-braces # 单行条件语句加上括号(if() {};)
--delete-empty-lines # 删除空行
--lineend=linux # 使用 \n 换行符