文章目录
[VSCode] 常用插件
- mshr-h.veriloghdl
- vscodevim.vim
- yzhang.markdown-all-in-one
[VSCode] 设置Git-bash作为默认终端
打开vscode的设置文件,settings.json,添加以下设置(注意:以前的terminal.integrated.shell.windows已经废弃):
//"terminal.integrated.shell.windows": "D:\\Program Files\\Git\\bin\\bash.exe",
"terminal.integrated.profiles.windows": {
"Git-Bash": {
"path": "D:\\Program Files\\Git\\bin\\bash.exe"
}
},
"terminal.integrated.defaultProfile.windows": "Git-Bash",
[VSCode] 设置在终端中“选中复制”和“右键粘贴”
打开vscode的settings:
1) 选中复制: 搜索 copy on selection,勾选;
2) 右键粘贴: 搜索 right click behavior, 下拉选择 paste (not copypaste)。
[Git-bash] warning:LF will be replaced by CRLF…
原因:Windows的换行是CRLF,Linux的换行是LF。
解决方案:简单的说,git做如下设置即可:
#提交时转换CRLF为LF,检出时不转换
git config --global core.autocrlf input
如果你想在Window上保留CRLF的格式,设置如下:
#提交时转换为LF,检出时转换为CRLF
$ git config --global core.autocrlf true
[Git-bash] fatal: no matching host key type found. Their offer: ssh-rsa
现象:git 通过ssh-rsa认证链接远程库的时候提示如下信息:
Unable to negotiate with xxx port xxx: no matching host key type found. Their offer: ssh-rsa
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
原因:Git-bash 2.32版本之后,可能是认为ssh-rsa加密性能太弱,默认不支持ssh-rsa。
方案1:设置使支持ssh-rsa,即在 ~/.ssh/config 文件中加入以下内容(没有这个文件就新建一个):
Host <host address>
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
方案2:升级使用加密更强大的算法。(TODO)
[Git-bash] 支持Makfile
Git-bash 默认是不支持gcc和Makefile的,有两种解决方法:
- 方案1:安装gcc套件,gcc支持makefile。
- 方案2:仅支持makefile。
[Git-bash] 生成ssh key
- ssh-rsa:ssh-keygen -t rsa -N “” --C “generated by xxx”