使用Notepad ++作为Git Editor而不影响设置 [英] Using Notepad++ as Git Editor without affecting settings
问题描述
我使用并喜欢Notepad ++()作为我的git编辑器,虽然它不回答我最初的问题,但是是我的决议。
I use and love Notepad++ (http://notepad-plus-plus.org/) as my go to simple text editor. I have been using it as my default editor for git for a few weeks now and have noticed some funny behavior.
Normally I run Notepad++ with the Tab Bar enabled like so
However when I use Notepad++ as my git editor I would prefer it to open in the most basic mode possible (mainly no tabs, and in its own instance) I simply want a text editor to log my commit messages and such. The relevant section of my .gitconfig
is setup as follows
[core]
autocrlf = true
editor = "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
Using this Notepad++ opens as desired when launched from git, however, the next time I launch Notepad++ normally, it loses my prior settings and does not display the tab bar anymore. It is real annoying to have to update this setting every time I want to use Notepad++ after it is launched from git. Any suggestions as to how I can have Notepad++ work in both situations without the settings affecting each other?
Try as I might, I was not able to get either Notepad++, or Notepad++ Portable to work for me in this situation. Notepad++ displayed my initial problem of permanently changing my settings to those set from my .gitconfig
.
I was also unable to get Notepad++ Portable (http://sourceforge.net/projects/notepadpluspe/) to work as this requires Administrative privileges to run and therefore prompts for UAC every time it launches, which I see as a deal killer.
I ended up using the portable version of Sublime Text 2 (http://www.sublimetext.com/2) as my editor for git, which though it doesn't answer my initial question, was my resolution.
这篇关于使用Notepad ++作为Git Editor而不影响设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!