My digital notepad RSS 2.0
 Tuesday, September 01, 2009

Just a quick note, as much to my self as anyone else. I’m getting started with Git and wanted to use notepad++ as the editor for commits.

So I followed some basic instructions and tried setting it up like this:

git config --global core.editor "c:\Program Files (x86)\Notepad++\notepad++.exe"

and got this:

c:\Program Files (x86)\Notepad++\notepad++.exe: -c: line 0: syntax error near unexpected token `('
c:\Program Files (x86)\Notepad++\notepad++.exe: -c: line 0: `c:\Program Files (x86)\Notepad++\notepad++.exe \$@\'
error: There was a problem with the editor 'c:\Program Files (x86)\Notepad++\notepad++.exe'.
Please supply the message using either -m or -F option.

Helpful…

 

Different variations yielded the same results:

git config --global core.editor '"c:\Program Files (x86)\Notepad++\notepad++.exe"' 
git config --global core.editor 'c:\Program Files (x86)\Notepad++\notepad++.exe' 
git config --global core.editor "'c:\Program Files (x86)\Notepad++\notepad++.exe'" 

Until this Stack Overflow answer pointed me in the right direction:

git config --global core.editor "'c:/Program Files (x86)/Notepad++/notepad++.exe'"

So, keep those slashes going the right way

 
Tuesday, September 01, 2009 8:32:04 AM (Central Europe Standard Time, UTC+01:00)  #    Comments [0] -

Links
Twitter updates
    Archive
    <September 2009>
    SunMonTueWedThuFriSat
    303112345
    6789101112
    13141516171819
    20212223242526
    27282930123
    45678910
    About the author/Disclaimer

    Disclaimer
    The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

    © Copyright 2012
    Glenn F. Henriksen
    Sign In
    Statistics
    Total Posts: 46
    This Year: 0
    This Month: 0
    This Week: 0
    Comments: 31
    All Content © 2012, Glenn F. Henriksen
    DasBlog theme 'Business' created by Christoph De Baene (delarou)