commit 01236237421a765d0508002ab292f72676c29ddd Author: Rongsong Shen Date: Mon Nov 3 15:20:51 2025 +0800 Initial commit diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..a6bfef34 --- /dev/null +++ b/.clang-format @@ -0,0 +1,4 @@ +--- +BasedOnStyle: webkit + +--- diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..e4e5f6c8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*~ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..b8eda4f2 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# 1. commit 规则 +- 每个人 fork 自己的 branch, 从自己的 branch 做 PR,review 完再 commit + +# 2. code format +## 2.1. C +推荐使用 clang-format,公共配置放在源码里面 xce/.clang-format + +(理论上直接使用源码里面 xce/.clang-format 文件格式不会变) + +### 2.1.1. vscode 可以在配置中加上如下内容 +``` +"C_Cpp.clang_format_style": "WebKit", +"C_Cpp.clang_format_fallbackStyle": "WebKit", +``` + +### 2.1.2. vim & emacs + +clang-format -style="{BasedOnStyle: webkit}" -i XX.c + +## 2.2. golang + +使用默认 gofmt + +# 3. misc +## 3.1. Windows remap ctrl and alt key +create a reg file, e.g. remapkey.reg +``` +Windows Registry Editor Version 5.00 +[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] +"Scancode Map"=hex:00,00,00,00,00,00,00,00,05,00,00,00,38,00,1d,00,1d,00,38,00,38,e0,1d,e0,1d,e0,38,e0,00,00,00,00 +``` +then double click remapkey.reg to import it. Restart OS.