Setup Notepad++ with cloud syncing?
Vito Evola last edited by
I want Notepad+ to be completely synced across two computers using Dropbox.
Besides settings and plugins, I’d also like “sessions” to be synced: if I have various tabs open with files (both saved and not), I would like to continue my work on my other computer.
What would I need to do? Suggestions?
glennfromiowa last edited by glennfromiowa
I’m hoping you already know about the “cloud” settings in Notepad++, but just in case you don’t:
- Go into Settings -> Preferences -> Cloud -> and select the Set your cloud location path here: radio button.
- Then enter the DropBox folder path into the text box below it. Note that you’ll need to have your DropBox mapped to a local folder, not the internet URL. (See Note 1 below.)
- When you restart Notepad++, it will copy certain files from %APPDATA%\Roaming\Notepad++ folder to your DropBox folder.
Having established how to move settings to the cloud, I’ll make a disclaimer. Setting up cloud settings in Notepad++ is the only thing I have experience in. I have not tested the suggestions below, and I’m not a Notepad++ developer, so my suggestions below are merely from using the software and reading the forums for many years. But here are my suggestions on plugins and sessions.
Regarding sessions, perhaps the best way to share those across computers is to use the Load Session… and Save Session… options on the File menu. That does require that you save and load each session manually as you leave and start using each computer, but that’s not necessarily a bad thing, and may avoid some problems with trying to share sessions more automatically.
The sessions are managed by use of a session.xml file. Presumably, you could sync the %AppData%\Roaming\Notepad++\ folder to DropBox for each computer (see this post for a way to do that via symbolic links), but this is where I know it gets tricky. The session.xml file is read on startup of Notepad++, and it only saves the primary session (if you have multi-instance mode enabled). So if you have session.xml on a shared, softlinked folder, and primary sessions open on two different computers, presumably, when file settings are changed on computer A, they will not change on computer B until Notepad++ is (possibly closed, then re-) opened again. So if you were diligent about closing all sessions of Notepad++ before switching computers, it probably would work ok.
If it causes problems, you may need to use the Load/Save Session options or otherwise manually sync the session.xml file while Notepad++ is closed. Also see the section on sub-folders below.
For plugins, you should be able to install the plugins you use on each computer used - a one-time setup for each computer. (See Note 2 below.) But I’m guessing your main concern is the settings of the plugins. Those settings appear to be kept in a folder in %APPDATA%\Roaming\Notepad++\plugins\config, which won’t be a problem if you are able to successfully redirect the Notepad++ folder. If not, presumably, you could sync that folder to DropBox in a similar way, possibly with fewer side effects than syncing the whole Notepad++ folder.
There are two sub-folders in the %AppData%\Roaming\Notepad++\ folder: plugins and cloud. The plugins folder is discussed above. However, the cloud folder should contain a file named choice (no extension) after changing the cloud settings in Notepad++, that holds the local path to the DropBox/backup folder. That means that if you share the Notepad++ folder with session.xml and the cloud folder, each computer must have the same path to the DropBox folder (or a softlink to it, I guess). So if the DropBox folder is C:\Users\dsavant\DropBox\npp on one computer and C:\Users\dmsavant\DropBox\npp on another computer, it may be difficult to get this to work, especially if you don’t have rights to create users on both boxes.
So I think that’s all I can tell you about sharing settings, plugins, and sessions across the internet. Perhaps a Notepad++ developer will chime in with clarifications. A couple of parenthetical notes, though:
Note 1: I do not have a DropBox account, although I do have OneDrive and Google Drive accounts. For each of these, there is software to install that maps a local folder (a sort of symbolic link, I believe) to the filestore in the cloud. I assume DropBox has the same type of software/mechanism available.
Note 2: The plugin DLLs appear to be kept in the Program Files folder. One would need to test to see if simply copying the files from that folder on one computer to that folder on another computer would result in functioning plugins, but I would imagine actually installing them on each computer shouldn’t be much of a hardship (a one-time activity per computer), unless you’re truly installing and uninstalling plugins on a regular basis. The configuration files seem to be the part that is more likely to change.
Good luck on getting these to sync, and post back if you get it working or if you run into problems!
Vito Evola last edited by
Thanks! I was not aware of the cloud settings here!
It’s still not clear to me by just doing this what gets synced though. I understand from your post that plugins (and their settings) will not unless I go that extra step, is that right?
I may not be using the term “session” correctly (or maybe I am?). What I’m talking about is right now I have 4 tabs open with different files - some which are saved locally, others which are without name (“new2”). When I close NP++ on this computer, I don’t have to worry about saving even the unsaved files (usually they’re snippets and notes) because they’re backup up (and BTW I set the backup location to the cloud as well), so when I reopen NP++ I’m basically continuing from where I left off. (I’m not saving/loading sessions.)
I’m most interested to have this “session” (if it’s called that) synced across my work stations. Having set up the cloud as you mentioned, and set up my backup folder to the same cloud directory, would this work? (I know, I could try, but I don’t have another computer to try this on hand.)
I’m just wondering if it wouldn’t make more sense to find a way to install NP++ as a “portable app” directly in one of my clouds - wouldn’t everything then just be nicely wrapped there?
Thanks for your time!
glennfromiowa last edited by
First, you are using the term session exactly as I understand it: a group of files open in an instance of Notepad++, extending to cursor placement, backup paths, even folding, and marking styles if those are used. Take a look at %appdata%\Notepad++\session.xml to see what is saved in a session. If you’re looking at it in Notepad++, it’s generally recommended to not change it and to not have it open when closing Notepad++.
You may want to check out some pages from the Wiki. I don’t think it’s being actively updated anymore, but most information is still valid.
How to store and retrieve sets of files as they were opened in Notepad++
Notepad++'s configuration files
The files may vary from installation to installation, depending on customizations, settings, etc., but below is a pretty representative set. Notice that the session.xml file is on the local drive. As an example of what gets synced through:
- backup (folder)
Local appdata folder
- cloud (folder)
- plugins (folder)
You should be able to enter “%appdata%\Notepad++” in the address bar in Windows Explorer to get to the AppData folder.
Last weekend, I actually tried syncing some files from my work computer to my home computer. Since my work computer had a path of C:\Users<firstinitial><lastname>\Google Drive… and my home computer had a path of C:\Users<firstname> <lastname>\Google Drive… I wasn’t able to get it to work. I could manually open up the files in my Google Drive\backup\ folder, but the session didn’t automatically restore. Interestingly, when I returned to work, the new x files in my session did not open up for some reason. When I looked at the session.xml file, I could see the backup path for them and was able to restore them, but there must have been some small detail that it couldn’t resolve, so it just failed to re-open those files. If I were to try it again, I’d save the session manually at work (using File -> Save Session), and try opening that up at home.
As far as plugins, those are installed individually, so, for example, I could have the settings for Compare saved in an accessible file, but if I don’t have Compare installed on the other computer, it wouldn’t even know to look for the settings. I haven’t tried this, but you may be onto something with installing Notepad++ as a portable app. You can download the zip file and just expand that in a cloud folder.
Or you might be able to install it to a cloud folder. I know when installing, it has some options:
- Don’t use %APPDATA% - Enable this option to make Notepad++ load/write the configuration files from/to its install directory. Check it if you use Notepad++ in a USB device.
- Allow plugins to be loaded from %APPDATA%\notepad++\plugins It could cause a security issue. Turn it on if you know what you’re doing.
I’m not sure what happens if you check both of those options - would it load plugins from the USB (or cloud) device? Also, I’d want some more info about the security issue mentioned. But I don’t have info on that.
Peter Okorn last edited by
Sorry for replying to this topic, I know it is quite old.
I use cloud setting in Notepad++ to sync my notes between computers. Is there any way or client to view and edit these notes on iOS (iPhone)?
Thank you so much
Caio Carvalho last edited by
@Peter-Okorn Peter, are you able to use data from a computer to another using Notepad++ cloud? I’m trying but the only thing it does is save the data from computer A on computer A but ate the computer B I cannot retrieve it.
Someone know how to do that?