@@ -34,6 +34,40 @@ Git 做的很多工作都有一个默认方式。
34
34
35
35
最后,基本上 <<ch08-customizing-git#r_git_config>> 整个章节都是针对此命令的。
36
36
37
+ [[_core_editor]]
38
+ ==== git config core.editor commands
39
+
40
+ Accompanying the configuration instructions in <<ch01-getting-started#_editor>>, many editors can be set as follows:
41
+
42
+ .Exhaustive list of `core.editor` configuration commands
43
+ [cols="1,2",options="header"]
44
+ |==============================
45
+ |Editor | Configuration command
46
+ |Atom |`git config --global core.editor "atom --wait"`
47
+ |BBEdit (Mac, with command line tools) |`git config --global core.editor "bbedit -w"`
48
+ |Emacs |git config --global core.editor emacs
49
+ |Gedit (Linux) |`git config --global core.editor "gedit --wait --new-window"`
50
+ |Gvim (Windows 64-bit) |`git config --global core.editor "'C:/Program Files/Vim/vim72/gvim.exe' --nofork '%*'"` (Also see note below)
51
+ |Kate (Linux) |`git config --global core.editor "kate"`
52
+ |nano |`git config --global core.editor "nano -w"`
53
+ |Notepad (Windows 64-bit) |`git config core.editor notepad`
54
+ |Notepad++ (Windows 64-bit) |git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin" (Also see note below)
55
+ |Scratch (Linux)|`git config --global core.editor "scratch-text-editor"`
56
+ |Sublime Text (macOS) |`git config --global core.editor "/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl --new-window --wait"`
57
+ |Sublime Text (Windows 64-bit) |`git config --global core.editor "'C:/Program Files/Sublime Text 3/sublime_text.exe' -w"` (Also see note below)
58
+ |Textmate |`git config --global core.editor "mate -w"`
59
+ |Textpad (Windows 64-bit) |`git config --global core.editor "'C:/Program Files/TextPad 5/TextPad.exe' -m` (Also see note below)
60
+ |Vim |`git config --global core.editor "vim"`
61
+ |VS Code |`git config --global core.editor "code --wait"`
62
+ |WordPad |`git config --global core.editor '"C:\Program Files\Windows NT\Accessories\wordpad.exe"'"`
63
+ |Xi | `git config --global core.editor "xi --wait"`
64
+ |==============================
65
+
66
+ [NOTE]
67
+ ====
68
+ If you have a 32-bit editor on a Windows 64-bit system, the program will be installed in `C:\Program Files (x86)\` rather than `C:\Program Files\` as in the table above.
69
+ ====
70
+
37
71
==== git help
38
72
39
73
`git help` 命令用来显示任何命令的 Git 自带文档。
0 commit comments