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?

5 Answers 5

7

Get a portable version of Notepad++ (http://sourceforge.net/projects/notepadpluspe/) and set up git to use that. In the Notepad++PE.ini file add:

AdditionalParameters=-multiInst 

Then use your normal Notepad++ installation with all your settings for normal work.

Sign up to request clarification or add additional context in comments.

5 Comments

Great option, I had considered this, and may have to go this way, but I was wondering if there was a way to use the same exe and preserve the initial settings.
Ahh alas, I gave this a try and quite lamely, only one instance of either Notepad++ or Notepad++ Portable can be running at the same time. With Notepad++ open I tried to open my git editor (Notepad++Portable) and was graced with an error dialog.
Another instance of Notepad++ is already running. Please close other instance of Notepad++ before launching Notepad++Portable. I put a screenshot up on i1315.photobucket.com/albums/t598/jstromwick/…
I was able to start Notepad++Portable while having my normal Notepad++ running by adding AdditionalParameters=-multiInstto my Notepad++PE.ini
Yep you're right, I believe I was using an older version of the app previously. I was able to launch both at the same time using multiInst and it does indeed appear that they are truly different apps with different settings that do not effect each other. Unfortunately it looks like the installed version of Notepad++PE requires UAC elevation, which fails to launch from git console with $ Notepad++PE.exe sh.exe": ./Notepad++PE.exe: Bad file number
3
[core]
autocrlf = true
editor = "'C:/PROGRA~2/NOTEPA~1/NOTEPA~1.EXE' -multiInst -notabbar -nosession -noPlugin"

This worked for me.

Comments

2

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.

Comments

0

The solution is to remove the -notabbar option and downvote those devils, https://stackoverflow.com/a/1635493/1083704 and https://stackoverflow.com/a/2486342/1083704, who spreaded this heresy over the world.

Comments

0

@Val I agree. This worked for me.

[core]
    editor = 'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -nosession -noPlugin

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.