Mac Setup
1. Mac Setting#
- Turn on three finger drag for your Mac trackpad
- Increase the cursor moving speed:
System Preferences->Keyboard->Increase Key Repeat Rate - switch the
ctrlandcaps lockkey: https://support.apple.com/en-sg/guide/mac-help/mchlp1011/mac
2. Shell#
- Install iterm2
- theme: one dark
- font: source code pro
- Install Homebrew
- Install ZSH:
brew install zsh - Install oh-my-zsh
- Generating a new SSH key and adding it to the ssh-agent
- After ssh setup and add to the https://github.com/, it’s able to
git cloneresource for iterm2 now:- theme: github-nvim-theme
- font: source code pro
- To install new fonts on mac: Open
Font BookApp -> Open File -> Add Fonts To Current User -> Choose the downlaoded font files
- To install new fonts on mac: Open
- Init .gitconfig
2.1 Zsh#
- configuration (.zshrc)
- setting:
- move the cursor by words:
1. Go to iTerm2 (in the menu bar) > Settings... > Profiles > Keys (not Preferences... > Keys) 2. On current versions (3.14+) you then switch to the Key Mappings tab 3. Press Presets... dropdown button. 4. Select Natural Text Editing - plugins:
- autojump:
brew install autojump - zsh-autosuggestions:
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions - zsh-syntax-highlighting:
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting - fzf
brew install fzf$(brew --prefix)/opt/fzf/install
- autojump:
3. vim#
- vim (.vimrc):
- install nvim:
brew install neovim - init nvim: https://neovim.io/doc/user/nvim.html#nvim-from-vim
- install vim-plug, copy
.vimrcand:PlugInstallto install plugins - install coc.nvim (
brew install nodefirst)
- install nvim:
3.1 coc.nvim#
I would say coc.nvim is VS Code in neo vim, as well as the function is also expanded by plugins. Here’s the basic plugins we used in daily development.
- coc-lists
- coc-go (for golang developer)
- coc-pyright (for python developer)
tmux#
brew install tmux- install tmux plugin manager: https://github.com/tmux-plugins/tpm
- copy config to
~/.tmux.conf tmux source ~/.tmux.conf(type this in terminal if tmux is already running)- theme: https://github.com/catppuccin/tmux
- intall by tpm (included in the config above)
- patch font via https://github.com/catppuccin/tmux#installation (for font installation refer to shell section 2)
4. Tool#
- fd is a simple, fast and user-friendly alternative to
find:brew install fd - Personal Script:
git clone https://github.com/jinying-che/Geript, add into system path in.zshrc - Hugo is one of the most popular open-source static site generators.:
brew install hugo - GitHub Readme Instant Preview:
brew install grip - tlrd: collection of community-maintained help pages for command-line tools, that aims to be a simpler, more approachable complement to traditional man pages.
5. Development#
5.1 golang#
- Install
golang: https://go.dev/doc/install
5.2 python#
- Install python:
brew install python3 - Install ipython:
pip install "ipython[all]"
Read other posts