Setup Guide for new Mac
-
new tab with same path iTerm2 -> Preference -> Profiles -> Working Directory, select Reuse previous session's directory or iTerm2 -> Preference -> Profiles -> Working Directory, select Advanced Configuration
-
new window starting from a certain path iTerm2 -> Preference -> Profiles -> Working Directory, select Advanced Configuration
Plugin: Simply type cmd + shift + x (on a Mac) or ctrl + shift + x (on a PC) to bring up the View: Extensions panel, then click on the Install button to install the extension you want. Must have plugins: vim
Homebrew calls itself The missing package manager for macOS and is an essential tool for any developer. https://brew.sh/
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew install tmux
https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration
git config --global user.name "yang"
git config --global user.email [email protected]
git config --global core.editor vim
git config --global core.excludesfile ~/.gitignore_global
git config --global core.pager ''
# core.pager: setting it to empty string turns it off. otherwise `git branch` opens a new `alternate screen` which is annoying
*~
.*.swp
.DS_Store
build
node_modules
*.iml
The Z shell (also known as zsh) is a Unix shell that is built on top of bash (the default shell for macOS) with additional features. It's recommended to use zsh over bash. It's also highly recommended to install a framework with zsh as it makes dealing with configuration, plugins and themes a lot nicer.
brew install zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
~/.zshrc
ZSH_THEME="ys"
- Verification https://www.markcampbell.me/2016/04/12/setting-up-yank-to-clipboard-on-a-mac-with-vim.html By default, OSX ships with vim which is not supporting system clipboard. Verification:
vim --version | grep clipboard
If you just want to be able to copy to OS X's clipboard, you just need +clipboard. If you want X11 clipboard support, you need +xterm_clipboard.
- install new vim To turn it on, need you install vim via homebrew with the proper options
brew install vim
After you've installed it, make sure that you've set up your PATH correctly to invoke the installed Vim instead of the default system one.
Try `which vim`
if showing /usr/bin/vim, it's the system old vim.
if showing /usr/local/bin/vim, it's the brew installed vim.
echo 'export PATH=/usr/local/bin:$PATH' >> ~/.zshrc
- setup .vimrc
" TLDR; turn on yank to clipboard, put following in ~/.vimrc
if has("clipboard")
set clipboard=unnamed " copy to the system clipboard
if has("unnamedplus") " X11 support
set clipboard+=unnamedplus
endif
endif
https://github.com/VundleVim/Vundle.vim
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
Launch vim and run :PluginInstall