macOS 食用指南
Preface
通知书到手,尘埃落定。考完就买了台macbook air,但那阵七七八八的杂事让人静不下心来仔细把玩,乱七八糟折腾了许久,逐渐get into the stride,但整个文件系统已经乱了,故打算重装一下,在此之前记录一下需要配置的地方
系统环境配置
使用相关
键盘
按键重复:快
重复前延迟:短
辅助功能
三指拖移:开
必安软件
- bandizip 压缩管理软件
- sensei 设备安全软件
- betterTouchTool 更好的快捷键处理软件
- office(e5)
- microsoft remote desk
- vscode
- hiddenBar
- ClashX
- iTerm2
一些教程
vscode安装加速教程
- 先到vscode官网点击下载获得下载链接,然后把url中的域名改成
vscode.cdn.azure.cn //vscode的国内镜像源
vscode cpp环境配置
//安装command line tool
xcode-select --install
m1上vs原生debugger有bug:无法正常调起窗口,安一个codeLLDB即可解决
必备插件列表
- codeLLDB
- C++ Intellisense
- c/c++
- vscode-icons
cpp vscode文件
懒得再写一遍了,按照如下配置生成的二进制可执行文件在build目录里面,与源码分离
注意需要先创建build目录,否则调试会报错
tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "compile",
"command": "/usr/bin/clang++",
"args": [
"-std=c++17",
"-stdlib=libc++",
"-g",
"${file}",
"-o",
"${fileDirname}/build/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": ["$gcc"],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "g++ - 生成和调试活动文件",
"type": "lldb",
"request": "launch",
"program": "${fileDirname}/build/${fileBasenameNoExtension}",
"args": [],
"cwd": "${fileDirname}",
"preLaunchTask": "compile"
}
]
}
python 环境
因为macos自带python,默认的python命令是系统自带的2.x的python
故需要在zsh中加个这个,改下默认的bin(其实可以用python3命令)
alias python="/opt/homebrew/bin/python3"
homebrew
国内镜像配置指南:
https://brew.idayer.com
github仓库指南
- ssh创建命令
ssh-keygen -t rsa -C "i@doeca.cc"
会存储到~/.ssh中
- 将公钥添加到github 个人profile中
- 验证
ssh -T git@github.com
see https://github.com/microsoft/vscode/issues/128492 for azure.cn's 坏事做尽
测一下avatar
原来homebrew有国内镜像啊qaq