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).
            Asked
            
        
        
            Active
            
        
            Viewed 1.2k times
        
    5
            
            
         
    
    
        woopata
        
- 875
- 5
- 17
- 29
- 
                    2http://danlimerick.wordpress.com/2011/06/12/git-for-windows-tip-setting-an-editor/ or http://stackoverflow.com/questions/10564/how-can-i-set-up-an-editor-to-work-with-git-on-windows/773973#773973 – MackieeE Jun 23 '14 at 15:10
2 Answers
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.
 
    
    
        jdylanmc
        
- 829
- 11
- 24
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.
 
    
    
        CCondron
        
- 1,926
- 17
- 27