環境
Node.js
Python
舊專案需要2.7版
套件管理工具
Homebrew
nvm
https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating
Manage different versions of nodejs.
xcode-select --install
yarn/pnpm
npm install -g yarn
npm install -g pnpm
Git
git config --global alias.co checkout
git config --global alias.st status
Changes will be saved in ~/.gitconfig
Editor
Oh-my-zsh
theme: powerlevel10k
plugins:
- auto suggestions
.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
修改提示文字顏色
Iterm2
下載配色檔item2-color-schemes,
Settings > Profiles > Colors > 右下角下拉選單import檔案
tmux
brew install tmux
plugins manager: tpm
~/.tmux.conf
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
run '~/.tmux/plugins/tpm/tpm'
themes: Nord tmux
~/.tmux.conf
# plugins
+ set -g @plugin "arcticicestudio/nord-tmux"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
run '~/.tmux/plugins/tpm/tpm'
Press prefix + I
to install plugins
使用目前路徑分割視窗
bind-key - split-window -v -c '#{pane_current_path}'
bind-key | split-window -h -c '#{pane_current_path}'
neovim
brew install neovim
brew install ripgrep # search words in files
lazyvim
https://www.lazyvim.org/installation
- plugins: (create files in
.config/nvim/lua/plugins
)
SSH
-
Generate ssh key and add it to github ssh-keygen -t ed25519 -C "your_email@example.com"
在 https://github.com/settings/keys
New SSH key >.ssh/id_ed25519.pub
的內容貼上 -
Distinguish between personal and work ssh key
App
Slack
https://slack.com/intl/zh-tw/downloads/mac
Vscode
https://code.visualstudio.com/download
Extensions:
- Prettier - Code formatter
- Vim
- ES7+ React/Redux/React-Native snippets
- GitLens
Shortcut:
// 左右移動分頁
[
{
"key": "shift+cmd+]",
"command": "workbench.action.nextEditor"
},
{
"key": "shift+cmd+[",
"command": "workbench.action.previousEditor"
}
]
// cmd + 數字鍵跳到第n個分頁
[
{
"key": "cmd+0",
"command": "workbench.action.openLastEditorInGroup"
},
{
"key": "cmd+1",
"command": "workbench.action.openEditorAtIndex1"
},
{
"key": "cmd+2",
"command": "workbench.action.openEditorAtIndex2"
},
{
"key": "cmd+3",
"command": "workbench.action.openEditorAtIndex3"
},
{
"key": "cmd+4",
"command": "workbench.action.openEditorAtIndex4"
}
]
- Launching from the command line
cmd+shift+p
and typeshell command
findShell Command: Install 'code' command in PATH