macOS 食用指南

·
教程 no tag August 7, 2021 浏览453次

Preface

通知书到手,尘埃落定。考完就买了台macbook air,但那阵七七八八的杂事让人静不下心来仔细把玩,乱七八糟折腾了许久,逐渐get into the stride,但整个文件系统已经乱了,故打算重装一下,在此之前记录一下需要配置的地方

系统环境配置

使用相关

键盘
按键重复:快
重复前延迟:短
辅助功能
三指拖移:开

必安软件

  1. bandizip 压缩管理软件
  2. sensei 设备安全软件
  3. betterTouchTool 更好的快捷键处理软件
  4. office(e5)
  5. microsoft remote desk
  6. vscode
  7. hiddenBar
  8. ClashX
  9. iTerm2

一些教程

vscode安装加速教程

  1. 先到vscode官网点击下载获得下载链接,然后把url中的域名改成
vscode.cdn.azure.cn //vscode的国内镜像源

vscode cpp环境配置

//安装command line tool
xcode-select --install

m1上vs原生debugger有bug:无法正常调起窗口,安一个codeLLDB即可解决

必备插件列表

  1. codeLLDB
  2. C++ Intellisense
  3. c/c++
  4. 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仓库指南

  1. ssh创建命令
ssh-keygen -t rsa -C "i@doeca.cc"

会存储到~/.ssh中

  1. 将公钥添加到github 个人profile中
  2. 验证
ssh -T git@github.com
  • 2018 年评 - Sorry
  • 记银川Evangelion终线下观影活动

已有 3 条评论
  1. tiger3018

    see https://github.com/microsoft/vscode/issues/128492 for azure.cn's 坏事做尽

    tiger3018 2021年9月27日 14:59回复
    1. tiger3018

      测一下avatar

      tiger3018 2021年9月27日 15:00回复
  2. 季悠然

    原来homebrew有国内镜像啊qaq

    季悠然 2021年9月4日 09:41回复
取消回复

说点什么?

© 2022 忧末的茶馆. Using Typecho & Moricolor.

宁ICP备17002477号

ß