5

What i need is command in Git Bash which will open files (txt,html,php..) in Notepad++. Just like when i type notepad test.txt test.txt opens in notepad, i want similar command, let's say npp test.txt which will open test.txt in Notepad++. I'm using Win7(64).

1

2 Answers 2

1

I create a file called npp in my Notepad++ installation directory. npp has the following in it:

#!/bin/sh
"c:/Program Files (x86)/Notepad++/notepad++.exe" -multiInst -notabbar -nosession -noPlugin "$*"

Then add the Notepad++ installation to your PATH.

Now, in git bash you can use a command like: npp foo.txt to start up Notepad++ editing foo.txt.

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

Comments

1

updated: Best way so far add notepad++ to the path and

$ start notepad++ [file path]

or you can add

alias npp='winpty "C:/Program Files (x86)/Notepad++/notepad++.exe"'

to your .bashrc file in your home directory.

Worked much better for me with Git Bash.

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.