vscode 配置 linux C++ 开发环境 和 终端配置 oh-my-zsh
1. 配置 linux C++ 开发环境
vscode 安装 C/C++
; Code Runner
插件。
# 安装 gdb
sudo apt-get update
sudo apt-get install gdb
点运行按钮就可以 调试和运行 代码了。
2. 配置 oh-my-zsh
sudo apt update
sudo apt install zsh
chsh -s $(which zsh)
sh -c "$(wget -O- https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
主要需要开 vpn,并且 git 需要配置代理。
git config --global https.proxy http://127.0.0.1:7890
git config --global http.proxy http://127.0.0.1:7890
我选的主题是 ys
。
复制粘贴 卡住:
~/.zshrc
# This speeds up pasting w/ autosuggest
# https://github.com/zsh-users/zsh-autosuggestions/issues/238
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
}
pastefinish() {
zle -N self-insert $OLD_SELF_INSERT
}
zstyle :bracketed-paste-magic paste-init pasteinit
zstyle :bracketed-paste-magic paste-finish pastefinish
参考: https://zhuanlan.zhihu.com/p/698329179
配置 clash 代理:http://www.roger.city/article/2021/10/27/23.html
补全失效:
vim ~/.zshrc
source ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
source ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh
3. Ubuntu 20.04下 VS code 无法使用中文输入法的问题:
https://www.cnblogs.com/dechinphy/p/vscode-cn.html