开发环境

Vscode 插件

c/c++
Gitlens
Remote-SSH
vim
python

trailing spaces

会提示代码中末尾多出来的空格

clang format

C++ 的格式化插件会缩进命名空间。我目前的解决方法是,在repo目录下建一个.clang-format文件,配置如下

UseTab: Never
IndentWidth: 4
BreakBeforeBraces: Allman
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
ColumnLimit: 0
AccessModifierOffset: -4
PointerAlignment: Left

配置C/C++的自动跳转

将某些库安装之后,.h文件可能会跳转到/usr/下面,需要把对应的路径屏蔽掉

首选项->配置->搜索files.exclude,修改对应的json配置

"C_Cpp.files.exclude": {
    "/usr/local/include/ceres": true,
}

关闭右侧预览

在配置中搜索editor.minimap.enabled,取消勾选

vim 配置

.vimrc

tmux 配置

.tmux.conf

更新配置:ctrl b + : , source-file ~/.tmux.conf

ssh 配置

ssh:
# 生成shkey
ssh-keygen
# 把ssh key copy到服务器上
ssh-copy-id ${username}@${server}
git:
# 把以下内容复制到github上即可
cat ~/.ssh/id_rsa.pub
# git 默认使用ssh,如果本机ssh端口和目的服务器ssh端口不一致,可能会有问题。
# 修改.git/config中的clone命令
ssh://\[user@\]host.xz\[:port\]/path/to/repo.git/
# 在前面加上了ssh://前缀,在域名后面加上端口
© 皖ICP备20011981号