13

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

enter image description here

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?

4

5 回答 5

7

获取 Notepad++ 的便携版本(http://sourceforge.net/projects/notepadpluspe/)并设置 git 以使用它。在Notepad++PE.ini文件中添加:

AdditionalParameters=-multiInst 

然后使用正常的 Notepad++ 安装和所有设置进行正常工作。

于 2013-05-02T06:48:29.247 回答
3
[core]
autocrlf = true
editor = "'C:/PROGRA~2/NOTEPA~1/NOTEPA~1.EXE' -multiInst -notabbar -nosession -noPlugin"

这对我有用。

于 2014-07-07T11:35:47.530 回答
2

尽我所能,在这种情况下,我无法让 Notepad++ 或 Notepad++ Portable 为我工作。Notepad++ 显示了我的初始问题,即将我的设置永久更改为我的.gitconfig.

我也无法让 Notepad++ Portable ( http://sourceforge.net/projects/notepadpluspe/ ) 工作,因为这需要管理权限才能运行,因此每次启动时都会提示输入 UAC,我认为这是一个交易杀手。

我最终使用 Sublime Text 2 ( http://www.sublimetext.com/2 ) 的便携式版本作为我的 git 编辑器,虽然它没有回答我最初的问题,但这是我的解决方案。

于 2013-05-23T05:31:08.543 回答
0

解决方案是删除该选项并否决那些将这种异端传播到世界各地-notabbar的恶魔https://stackoverflow.com/a/1635493/1083704https://stackoverflow.com/a/2486342/1083704 。

于 2013-10-24T09:03:48.297 回答
0

@Val 我同意。这对我有用。

[core]
    editor = 'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -nosession -noPlugin
于 2016-10-11T14:27:00.873 回答