问题
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