How to launch and edit a file from Git using Notepad++?
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 开发者_JAVA百科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.
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.
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.
You must first add Notepad++ as the main program. On Git Bash
git config --global core.editor "'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Notepad.lnk' -multiInst -notabbar -nosession -noPlugin
And then you will be able to create the file by writting
start notepad README.md
start notepad++ README.md
精彩评论