增加預設編輯器,並調整chezmoi架構

This commit is contained in:
2025-05-02 09:30:44 +08:00
parent 79c2ae90c6
commit ee6816e276
3 changed files with 22 additions and 8 deletions

View File

@@ -0,0 +1,21 @@
{{- /* ---- 設定環境變數 -------------------------------------------------- */ -}}
{{- /* 設定預設編輯器 */ -}}
{{ if eq .chezmoi.os "linux" }}
# linux config
[ -n "$DISPLAY" ] && export EDITOR=kate|| export EDITOR=nvim
{{ else }}
export EDITOR=nvim
# non-linux config
{{ end }}
export VISUAL=nvim
{{- /* ---- 設定ailas ---------------------------------------------------- */ -}}
## Alias section
alias cp="cp -i" # Confirm before overwriting something
alias df='df -h' # Human-readable sizes
alias free='free -m' # Show sizes in MB
alias gitu='git add . && git commit && git push'