To call Notepad ++ from Git bash

Trying to run Notepad ++ from Git Bash, so I did

git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"

then

> echo 'alias notepad++="C:/Program Files
> (x86)/Notepad++/notepad++.exe"' >> ~/.bashrc

after that I restarted GitBash and tried to run notepad ++, but I get an error and error message.

WARNING: found ~ / .bashrc but no ~ / .bash_profile, ~ / .bash_login or ~ / .profile.

This seems like a misconfiguration. A ~ / .bash_profile that loads ~ / .bashrc will be created for you.

if I ran notepad ++, getting it

bash: syntax error near unexpected token `('
+4
source share
4 answers

Description

OS: Windows 7 x64

Switch to C:\Users\<your username>\

Find the .gitconfigfile and open it using notepad or any other text editor; add the following lines to the end of the file

Example

[core]  
    editor = 'F:/Software/Notepad++/Notepad++Portable.exe'

git config --global core.editor "'C:/Program Files/TextPad 5/TextPad.exe' -m"

, , .

+2

'\' '\\'

git config --global core.editor "'C:/Program Files \\\\(x86\\\\)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
+1

It worked for me

alias notepad="/c/Program\ Files\ \(x86\)/Notepad++/notepad++.exe"

Source: http://cruisebogedin.com/2014/01/make-notepad-default-editor-in-git/

+1
source

just tried to place the Notepad ++ folder on another drive and with the shell command alias notepad ++ = 'd: / Notepad ++ / notepad ++. exe '
and it worked.

0
source

Source: https://habr.com/ru/post/1648232/


All Articles