Setup Notepad++ with cloud syncing?
-
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?
-
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!
-
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!
-
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 filesThe 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:
cloud folder
- backup (folder)
- config.xml
- contextMenu.xml
- langs.xml
- shortcuts.xml
- stylers.xml
- userDefineLang.xml
Local appdata folder
- cloud (folder)
- plugins (folder)
- functionList.xml
- session.xml
- XMLToolsExt.ini
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.
-
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
-
@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? -
Anyone knows how I can sync between devices?
-
What exactly do you want to sync?
Your npp configuration?
Your files created/modified by npp?
Something else?
Where are the devices located?
Different OS in place? -
@Ekopalypse , I would like to say,
I want to sync opened tabs and data inside those tabs.
Let say, On one PC, i have notepad++ opened, file1.txt, file2.xyz,new 1, new 3 and now if I go to another PC, and open the notepad++, It should have all those tabs. -
Hello @Chintan-Bhatt,
Currently only settings can be saved in the cloud path.
But let me think if there is a way to make npp think that it is started from the cloud path to load and save the session.xml accordingly. -
@Chintan-Bhatt said in Setup Notepad++ with cloud syncing?:
@Ekopalypse , I would like to say,
I want to sync opened tabs and data inside those tabs.
Let say, On one PC, i have notepad++ opened, file1.txt, file2.xyz,new 1, new 3 and now if I go to another PC, and open the notepad++, It should have all those tabs.I agree, I came here looking for this feature. It would be great if it gets implemented! Thanks
-
@________ And same here. It would be really great to have the session synchronized from the Cloud path. Fingers crossed!
-
Just registered so i could support this request. :) So yes please!
-
@Pim-x ,
Something that no one adding their “me too” to this discussion seems to have understood: this Forum is a Community of Notepad++ Users, not the developers. Since the last time this topic was active, the Please Read Before Posting was added to help explain this, and that post links to the FAQ: Feature Request and Bug Report which for the last three years has explained the details of where and how to make a feature request (which, spoiler alert, is not in this Community Forum, and especially not in this four-year-old discussion).
Since the “Cloud” settings aren’t quite enough for you (since it doesn’t move session.xml), then you should read about Config Files Location and try using the
-settingsDir
command line option, and see if that will sync enough.And if it doesn’t sync enough, then you can just unzip the portable edition into your cloud folder, and that way your entire Notepad++ – executables, plugins, and settings – will be synced across the cloud, which guarantees that all your settings and sessions will be the same across computers.
-
@Pim-x same! - I think it would be huge to allow either adding this feature - it’s not like they couldn’t even let the burden of storage fall on a user’s OneDrive or GoogleDrive or DropBox or something - but at least let us point to a data store for our open tabs/files/etc.