Search code examples
ruby-on-railsgitnotepad++

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 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.


Solution

  • 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.