Invoking notepad++ from Git Bash

后端 未结 14 2305
隐瞒了意图╮
隐瞒了意图╮ 2021-01-31 16:01

I am using msysgit in Windows 7. How do I invoke notepad++ from Git Bash, like we do it with our default notepad?

Like for example

name@usename notepad textfile.t

14条回答
  •  一向
    一向 (楼主)
    2021-01-31 16:28

    I added this for my 64-bit machine with 32-bit Notepad++.

    $ cd ~
    $ vim .bash_profile
    

    Add this to the file then save:

    64-bit systems

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

    32-bit systems

    alias npp="/c/Program\ Files/Notepad++/notepad++.exe"
    

    Now you should be able to open any file with notepad++ by entering

    $ npp [file_name]
    

提交回复
热议问题