環境
nvm
https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating
Manage different versions of nodejs.
yarn/pnpm
npm install -g pnpm
Git
git config --global alias.co checkout
git config --global alias.st status
Changes will be saved in ~/.gitconfig
- lazygit
brew install lazygit
Editor
Oh-my-zsh
theme: powerlevel10k
plugins:
_ auto suggestions
_ .oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh修改提示文字顏色
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}'
## 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
- [Enable Multiple SSH Keys for MacOS/ Ubuntu/ Debian etc.](https://gist.github.com/bonnopc/c78920431284ce3fc2a5270016205116)
### Vscode
https://code.visualstudio.com/download
Extensions:
1. Prettier - Code formatter
2. GitLens
Shortcut:
```json
// 左右移動分頁
[
{
"key": "shift+cmd+]",
"command": "workbench.action.nextEditor"
},
{
"key": "shift+cmd+[",
"command": "workbench.action.previousEditor"
}
]
// cmd/ctrl + 數字鍵跳到第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+pand typeshell commandfindShell Command: Install 'code' command in PATH