Colin's Blog

Recent content on Colin's Blog

马上订阅 Colin's Blog RSS 更新: https://blog.oyyko.com/index.xml

New Macbook Setup

finalwind42@gmail.com (Oyyko)
2023年10月5日 01:41

Install HomeBrew

see https://brew.sh/.

增加软件仓库

1brew tap homebrew/cask-fonts 2brew tap homebrew/cask

在增加了homebrew/cask之后,安装cask中的软件不需要brew install --cask, 只需要直接brew install即可。

但是官方不建议这么做,官方做法是使用brew install --cask XXX

Use homebrew to install Apps

1## Install Rust CLI Apps2brew install bat fd wget bottom lsd ripgrep3## Install cask Apps4brew install --cask google-chrome visual-studio-code wechat qq iterm2 iina

Install snap

With Snap App, you can use Command ⌘ + 1 to call the first app in your dock.

从App Store下载。这是免费的。

Install Flow

Flow可以定时提醒自己休息。从App Store下载或者brew安装都可以。

Tex

安装MacTex即可。

1brew install --cask mactex

下载字体

1brew install font-jetbrains-mono-nerd-font2brew install font-jetbrains-mono

配置iterm2和zsh

~/.zshrc中配置alias ins="brew install"

1ins zsh-fast-syntax-highlighting2ins zsh-autosuggestions3ins zsh-completions4ins zsh-history

安装了之后需要在zshrc中配置才能生效如下

 1 2source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh 3 4if type brew &>/dev/null; then 5  FPATH=$(brew --prefix)/share/zsh-completions:$FPATH 6  zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*' 7  autoload -Uz compinit 8  compinit 9fi1011source /opt/homebrew/opt/zsh-fast-syntax-highlighting/share/zsh-fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh

安装zoxide

zoxide会记忆你最近访问的目录。例如你最近访问过~/aaa/bb/banana,那么不管你当前处在哪一个目录,你都可以用z ba来跳转到banana目录下吗。z b, z ba,z ban都是可以的。安装方法:ins zoxide之后在zshrc中配置eval "$(zoxide init zsh)"

安装p10k

参考https://github.com/romkatv/powerlevel10k

使终端中的option ⌥ + ← 可以实现跨单词跳转

在zshrc中配置

1bindkey "\e\e[D" backward-word...

剩余内容已隐藏

查看完整文章以阅读更多