How to launch and edit a file from Git using Notepad++?

我们两清 提交于 2020-01-24 05:47:34

问题


I have set up Notepad++ as my default editor as in this topic: How can I set up an editor to work with Git on Windows?

with this command:

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

Now, I'm working through a Ruby on Rails tutorial. On one step, the author uses the command: $mate README.markdown to launch his TextMate editor and edit the readme file.

My question is, now that I have set up Notepad++ as my default editor, what is the equivalent command that I should use to launch Notepad++ and edit the file?

Note: I'm a beginner with this Git and Ruby on Rails. Please go easy on me! Thanks in advance.


回答1:


C:/Program Files/Notepad++/notepad++.exe README.markdown

And since you'll probably want to use notepad++ a lot from the command line, you may want to alter your PATH to include its root directory, so you don't need to write the full path each time.




回答2:


Add notepad++.exe to your Windows path enviromental variable( the whole path), this option is in computer, right click, advance system setting enviromental variables. After from command promp just do: notepad++ markdown.README

You could also just use the whole path to notepad.exe everytime but that gets old, just learn how to edit your enviromental variables in windows.



来源:https://stackoverflow.com/questions/4778882/how-to-launch-and-edit-a-file-from-git-using-notepad

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!