Using Notepad++ as Git Editor without affecting settings

我与影子孤独终老i 提交于 2019-11-30 11:46:14

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.

[core]
autocrlf = true
editor = "'C:/PROGRA~2/NOTEPA~1/NOTEPA~1.EXE' -multiInst -notabbar -nosession -noPlugin"

This worked for me.

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.

Val

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.

@Val I agree. This worked for me.

[core]
    editor = 'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -nosession -noPlugin
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!