2018年3月14日 星期三

使用 notepad++ 做為 git commit 時預設的編輯器

一般來說,git bash 可以經由修改 globle 的 .gitconfig 設定來執行
git config --global core.editor xxxxxxxx
而 notepad++ 直接設定下去,會有時候關掉 notepad++ 卻回不去 cmder 中的情況,所以解決方式:

git config --global core.editor "'c:\Program Files\Notepad++\notepad++.exe' -multiInst -notabbar -nosession -noPlugin '$*'"

其中  'c:\Program Files\Notepad++\notepad++.exe' 為 notepad++ 路徑,
像我最終是改為 'C:\\Program Files (x86)\\Notepad++\\notepad++.exe'
所以我最後的指令是:

git config --global core.editor "'C:\Program Files (x86)\Notepad++\notepad++.exe' -multiInst -notabbar -nosession -noPlugin '$*'"

以上
Posted on 3/14/2018 09:49:00 上午 | Categories: