首页 Mac常用工具配置
文章
取消

Mac常用工具配置

下载Command_Line_Tools_for_Xcode

安装homebrew

1
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

安装常用软件

1
brew install --cask iterm2

常用软件:iterm2, vscode, 1password, chrome…

安装oh-my-zsh

1
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

plugins

  • Path: .oh-my-zsh/custom/plugins
  • Zsh-syntax-highlighting
    1
    
      git clone  https://github.com/zsh-users/zsh-syntax-highlighting
    
  • zsh-autosuggestions
    1
    
      git clone https://github.com/zsh-users/zsh-autosuggestions
    
  • 更新.zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
plugins=(
  git
  zsh-autosuggestions
  zsh-syntax-highlighting
)

bindkey ',' autosuggest-accept
# 修复复制字符一个个出现的问题
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

更新vim

  1. 下载vimrc文件到用户目录
  2. 配置plug-vim
1
2
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  1. Reload .vimrc and :PlugInstall to install plugins.

Asdf

  1. brew install asdf
  2. 配置asdf
    1
    
    echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ${ZDOTDIR:-~}/.zshrc
    
  3. 安装插件
    1
    2
    3
    
    asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
    brew install gpg
    asdf global nodejs 14.17.5
    
本文由作者按照 CC BY 4.0 进行授权

我的第一篇博客

Docker 基础