Skip to content

Commit 510455b

Browse files
committed
[core.editor] improve first time setup to include Notepad++
On a Windows system, even though you have setup Notepad++ as default system editor, Git seems to behave oddly during operations and you may trip over glitches, like prematurely terminated Git operations before your edits are complete. Setting up core.editor in Git explicitly to Notepad++ fixes this behaviour.
1 parent 98c409c commit 510455b

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

book/01-introduction/sections/first-time-setup.asc

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,38 @@ Many of the GUI tools will help you do this when you first run them.
3939
==== Your Editor
4040

4141
Now that your identity is set up, you can configure the default text editor that will be used when Git needs you to type in a message.
42-
If not configured, Git uses your system's default editor, which is generally Vim.
42+
If not configured, Git uses your system's default editor, which is system dependant.
43+
4344
If you want to use a different text editor, such as Emacs, you can do the following:
4445

4546
[source,console]
4647
----
4748
$ git config --global core.editor emacs
4849
----
4950

51+
While on a Windows system, if you want to use a different text editor, such as Notepad++, you can do the following:
52+
53+
On a x86 system
54+
[source,console]
55+
----
56+
$ git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -nosession"
57+
----
58+
On a x64 system
59+
[source,console]
60+
----
61+
$ git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -nosession"
62+
----
63+
64+
[NOTE]
65+
====
66+
Vim, Emacs and Notepad++ are popular text editors often used by developers on Unix based systems like Linux and OS X or a Windows system.
67+
If you are not familiar with either of these editors, you may need to search for specific instructions for how to set up your favorite editor with Git.
68+
====
69+
5070
[WARNING]
5171
====
52-
Vim and Emacs are popular text editors often used by developers on Unix based systems like Linux and Mac.
53-
If you are not familiar with either of these editors or are on a Windows system, you may need to search for instructions for how to set up your favorite editor with Git.
54-
If you don't set an editor like this and you don't know what Vim or Emacs are, you will likely get into a really confusing state when they are launched.
72+
You may find, if you don't setup an editor like this, you will likely get into a really confusing state when they are launched.
73+
Such example on a Windows system may include a prematurely terminated Git operation during a Git initiated edit.
5574
====
5675

5776
==== Checking Your Settings

0 commit comments

Comments
 (0)