从Git Bash调用notepad ++ [英] Invoking notepad++ from Git Bash
问题描述
我在窗口7中使用 msysgit 。我如何从Git Bash中调用notepad ++,就像我们使用默认的记事本。例如
Hi guys i'm using msysgit in Window 7. How do i invoke notepad++ from Git Bash like we do it with our default notepad. Like for example
name @ usename notepad textfile.txt
name@usename notepad textfile.txt
而我希望文件用notepad打开++
Instead i want the file to open with notepad++
注意:我已将notepad ++添加到我的PATH中,但仍无法从命令行调用它。
Note : I've added notepad++ to my PATH, but still unable to invoke it from commandline.
编辑
我在 .gitconfig - >
[alias] notepad ='C:/ Program Files / Notepad ++ / notepad ++。exe'
[alias] notepad='C:/Program Files/Notepad++/notepad++.exe'
/ p>
but isn't working.
推荐答案
因此,默认情况下,你不会有.bashrc文件,所以只需通过键入: p>
So, by default you won't have a .bashrc file so just navigate your to your home directory by typing:
cd ~
使用vim(或您熟悉的任何编辑器)创建或编辑.bashrc:
create or edit the .bashrc with vim (or whatever editor you are comfortable with):
vim .bashrc
这是我要添加到我的行(我运行的64位操作系统,所以如果你' t不要精确复制)
Here is the line I had to add to mine (I am running a 64 bit OS so if you aren't don't copy this exactly)
alias notepad="/c/Program\ Files\ \(x86\)/Notepad++/notepad++.exe"
如果你的windows的副本是32位,像这样
If your copy of windows is 32 bit then it should look like this
alias notepad="/c/Program\ Files/Notepad++/notepad++.exe"
这篇关于从Git Bash调用notepad ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!