32 lines
961 B
Markdown
32 lines
961 B
Markdown
# 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.
|