File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,8 +60,8 @@ template = "~/.dotfiles/pkg/git/.git_commit_template"
6060[core ]
6161attributesFile = " ~/.dotfiles/pkg/git/.gitattributes"
6262commentString = " //"
63+ # editor = "micro" # Just use $EDITOR
6364excludesFile = " ~/.dotfiles/pkg/git/.gitignore"
64- editor = " nano"
6565
6666[diff ]
6767# https://blog.gitbutler.com/how-git-core-devs-configure-git/#better-diff
Original file line number Diff line number Diff line change @@ -19,8 +19,13 @@ export LANG="zh_TW.UTF-8" # Chinese (Taiwan)
1919export LC_ALL=" en_US.UTF-8" # English
2020
2121# Editor
22- export EDITOR=" subl" # Sublime Text
23- # export EDITOR="code" # VS Code
22+ if [[ -n " $IS_CURSOR " ]]; then # Cursor
23+ export EDITOR=" cursor --wait"
24+ elif [[ " $TERM_PROGRAM " == " vscode" ]]; then # VS Code
25+ export EDITOR=" code --wait"
26+ else
27+ export EDITOR=" subl --wait" # Sublime Text
28+ fi
2429# export EDITOR="micro" # micro
2530# export EDITOR="nano" # nano
2631# export EDITOR="vim" # vim
You can’t perform that action at this time.
0 commit comments