Wednesday, April 16, 2014

Use Notepad++ to remotely edit your scripts from your RPi

So your main development platform is your Windows machine.
Your preferred editor is Notepad++ but you are developing programs to work with your Raspberry Pi.

What do you do up to now?

  1. Either you SSH to your RPi and work through VIM, Nano, Emacs etc. without Notepadd++ or,
  2. You work on your Windows machine through Notepad++ and you upload your scripts to the RPi, SSH and execute them to check if everything is working as should.
This is working and you might have already got used to it but why not to make your life easier?

You can enjoy Notepad++ and all the features provided by this beloved editor and at the same time work "directly" on your RPi. 

This can be done with the use of the NppFTP plugin.

After installing the plugin choose Show NppFTP window. The console will open at the RHS of the Notepad++ interface.


Click on the gear icon and choose profile settings:


In the pop up window, click on Add new to create a new profile. Set your settings accordingly:


Make sure to choose SFTP as your connection type (FTP over SSH) and port 22. Type in your RPi username & password and set your desired Initial remote directory. I store my scripts in the folder myscripts on the Desktop of "pi" user thus my initial remote directory is set to /home/pi/Desktop/myscripts.
When done click close. Having chosen the desired profile, click on the connect button .

Your RPi's filesystem is now populated:

Browse to your scripts location and double click the desired script.

The file will be cached on your Windows machine and each time you click on save will be uploaded to your RPi.

Note that in case you lose connection to your pi, your working file can be located at a path similar to:
C:\Users\<user>\AppData\Roaming\Notepad++\plugins\config\NppFTP\Cache\pi@192.168.2.31\


No comments :

Post a Comment