If Vim keeps hijacking your commit messages and you secretly want a friendly GUI that does not judge your grammar Notepad++ is the obvious escape route. This short guide shows how to set Notepad++ as the default Git editor on Windows so commit messages open in a window you can actually navigate.
Keep these simple checks in your back pocket
Open a terminal that can run Git commands and run the following command. It tells Git to launch Notepad++ for commit messages and to open a fresh window so you are not greeted by last week's chaos.
git config --global core.editor "notepad++ -multiInst -nosession"
The flags mean open a new Notepad++ instance and do not restore the previous session. That keeps your commit editing focused and less dramatic.
Use a full path in quotes. A safe option is to reference the Program Files environment variable like this when you need to be explicit.
git config --global core.editor "%ProgramFiles%\\Notepad++\\notepad++.exe" -multiInst -nosession
Replace the path above if you installed to a different folder. The idea is the same make Git run the executable you want.
Make a quick commit that triggers an editor window. The simplest way is to run a commit without a message flag so Git will open the configured editor.
git add .
git commit
If Notepad++ opens you win. If something else opens check your PATH and the core.editor value with this command.
git config --global --get core.editor
Reverting is painless. Either unset the core.editor or replace it with something else.
git config --global --unset core.editor
git config --global core.editor "code --wait"
That is it. You have stopped Vim from opening your commit messages and given Notepad++ the job. Enjoy commits in a familiar window and save yourself a few minutes and a little keyboard angst each day.
I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!
This is a dedicated watch page for a single video.