Lately I've been doing a lot of work with Notepad++ and Subversion, however I was surprised to find that there are no plugins available that integrate the two. At least, no plugins Google could easily find for me. Due to the nature of my project, a lot of commits are required, and I was wasting a lot of time switching between Notepad++ and Windows Explorer in order to commit changes. Being a software engineer, I figured out a good solution: I'll write my own Subversion plugin for Notepad++.
Notepad++ has a good plugin system, however it's very poorly documented. I relied mostly on looking at the source code for plugins that shipped with the application in order to figure out how to do things. Maybe there's a mystical page somewhere full of explanations and examples, but I definitely missed it.
In this first version, I implemented the basic update/commit commands that I needed for my own development. Depending on whether or not anyone else finds this plugin useful, or if I find extra time, I might slowly expand the features.
The plugin simply uses the command line features of TortoiseSVN, so you'll have to install it before the plugin will work.
Update: January 3rd, 2009
I incorporated some code sent to us by Douglas Phillips, which opens the plugin up to more systems than just Windows Vista. It now definitely works under Windows XP. I also added the ability to Commit and Update all opened files, instead of just the currently visible one.
Installation Instructions
Make sure TortoiseSVN is installed and you've installed the latest version of Notepad++.
The plugin comes in the form of a zipped, dll. Simply unzip the dll and place it in the Notepad++ plugins directory. For a typical install, it will be located here: "C:\Program Files\Notepad++\plugins". Next time you launch Notepad++, the plugin will automatically be loaded.
The plugin should work under Windows XP and Windows Vista. If you find any bugs on these systems or others, drop a comment and I'll see if I can address them.
If you're interested in the source code for this plugin, you can download a Visual Studio 2008 project here.
12/25/2008 - 19:49
Hi~
I used this plugin with notepad++ v5.1.2 on my XP sp2. When I open notepad++,it showed
“The procedure entry point RegGetValueW could not be located in the dynamic link library ADVAPI32.dll”. After confirmed that message,it pops up a box said “Load library is failed.Make “Runtime Library” setting of this project as “Multi-thread(/MT)” may cure this problem ……” .
How could I solve this problem?
My CPU is P4 3.0 with HT support.
Regards,
James
12/27/2008 - 16:40
The function RegGetValueW, which I use to determine where TortoiseSVN is installed, is located in the DLL advapi32.dll, which apparently only ships with Vista or XP Pro x64 edition. I’ll change the code to something that supports more systems. The update should be available in the next couple of days.
12/29/2008 - 19:24
I just got the same message on a similar system. I’m looking forward to this. Good luck with it. I’ll check the rss and back here.
Happy new year!!
12/29/2008 - 20:39
If anyone is interested, I have compiled a modified version with the correct API call which should work against 32-bit and Non-Vista systems. I have no way of testing to be entirely sure (I’m running Vista x64), but it compiles cleanly and finds the registry entry appropriately.
If anyone wants to test it out on an XP or 2000 system, drop me an email at doug at sbscomp dot com and I’ll send it to you.
Hope this is useful to someone!
04/09/2009 - 08:25
I'd be very interested in a 32 bit version. I am using XP, and use NPP for all source code editing. I also use SubVersion, so would be keen to test this out.
Mike
04/09/2009 - 09:31
The current version available for download will work on 32 bit systems.
04/09/2009 - 10:24
I get the same problem as James - is there a download location for the fix for that?
04/09/2009 - 10:29
Actually it may be a different error - I get:
Load Library is failed.
Make "Runtime Library" setting of this project as "Multi-threaded(/MT)" may cure this problem.
This plugin is not compatible with current version of Notepad++
I am running npp v5.3.1
04/09/2009 - 14:30
I was using v5.2, so I upgraded to v5.3.1 and the plugin loaded without problem. I'm on a 32bit XP machine. Unfortunately I don't have any insights. If you get any more errors, please let me know.
01/03/2009 - 15:59
I’ve updated the download link to a new version, which incorporates Doug’s source. I’ve also added some new features. I’ve modified the post to describe them. Thanks for the feedback!
01/05/2009 - 00:45
It does work perfectly on my XP now ~~
Thanks very much.
01/07/2009 - 00:02
I have installed the plugin with NPP v5.1.3 Unicode and it works as advertised - Kudos!!!
My question: Is it reasonable to request that you consider doing up an NPP v5.1.x ANSI version of your SVN plugin?
I am requesting this as Jens is buried with other activities. So much so that he is not going to be able to port his Function List v2 plugin over to Unicode any time soon. The v2 Function List Plugin is a big part of what makes NPP so useable for me in my operating environment (custom language for embedded micro-controllers). Regex is so brutal (;-) and I have invested a lot of time in the creation of parsing rules for same. So much so that I am uncomfortable not leveraging my efforts in my daily use of NPP.
So, if you would be so kind to consider porting your plugin over to the latest ANSI NPP versions, it would be greatly appreciated. Thank you, in advance, for your time.
Donations will definately be considered for same.
Regardless of your decision, thank you for your time and effort. It is much appreciated!
-t
01/07/2009 - 00:44
There is the Explorer plugin (NOT the LightExplorer). Among other things it gives you access to the standard Windows Explorer context menu for files and folders. That’s what I use to issue TortoiseSVN commands from Notepad++.
02/25/2009 - 21:21
I just tried installing this into Notepad++ v5.0.3, but all that shows up on my Plug-Ins menu is an "S" for this item. The submenu then only has "Crtl+Alt+Shift+Unlisted" and if I click on that Notepad++ crashes with the following error:
An exception occured. Notepad++ cannot recover and must be shutdown. The exception details are as follows:
Code: 0xC0000005
Type: Access violation
Exception Address: 0x006F0055
The Visual Studio debugger then opens and displays lines like this:
0187DDDF ???
0187DDE0 ???
0187DDE1 ???
0187DDE2 ???
0187DDE3 ???
0187DDE4 ???
.
.
.
Any ideas what is happening?
I'm running Windows XP SP2, Notepad++ v5.0.3, and TortoiseSVN 1.5.0, Build 13316 - 32 Bit , 2008/06/21 07:55:29
Subversion 1.5.0,
apr 1.2.12
apr-utils 1.2.12
berkeley db 4.4.20
neon 0.28.2
OpenSSL 0.9.8g 19 Oct 2007
zlib 1.2.3
Thanks,
Ryan
02/25/2009 - 21:32
Nevermind. Notepad++ update checker wasn't working, so I thought I was using the lastest version, but wasn't. I upgraded and it is working great now! Thanks for this contribution!
One feature request would be to checkout directly from Notepad++. Others may not find this too helpful, but I tend to use Notepad++ to do quick updates to files in different SVN repos (and use Eclipse and Subclipse for the long-running projects), so this would be helpful.
Thanks,
Ryan
02/26/2009 - 04:22
This plugin isn't working for me. In the Plugins menu it just shows up as "S", and in the submenu of that there are only two entries "Ctrl+Alt+Shift+Unlisted" and blank. Selecting either of these entries causes a crash.
I am using Windows Vista 64 and Notepad++ 5.0.3.
Any ideas?
02/26/2009 - 04:25
NVM, dupe of Ryan's problem.
03/25/2009 - 22:26
I sure hope to find it useful - I have no idea what I'm doing with svn yet, but I used Notepad++ for all the coding I do in any language.
Thanks - I'm going to give it a shot.
-[[Neo]]
05/16/2009 - 12:01
Added "add" and "diff" functionalities.
I also made the code more general and easy to change.
DLL can be downloaded here: http://www.shererim.com/downloads/NPPSvn.zip
Sources here:
http://www.shererim.com/downloads/NPPSvn-source.zip
06/01/2009 - 09:29
Hey,
Recently I've started experiencing problems with what is otherwise a fantastic plugin, I wonder if anyone else has come across these issues and knows a fix?
When I use the keyboard shortcut for update file I get a black blob insert where the cursor is currently positioned with the letters EOT in it. Similarly, when I use the keyboard shortcut to commit a file i get another black blob, this time with the letters SOH.
However, if I use the menu to perform these actions, the plugin behaves as expected.
I've tried uninstalling and reinstalling to no avail.
Any help would be appreciated.
Cheers, Dan.
06/01/2009 - 10:43
It sounds like NP++ is interpreting the keystrokes as something it's supposed to put in the document. I tried to use a combination that wasn't used by something else and wouldn't put a character in the document. Maybe the newest version of NP++ is using this character. I'll do some testing to figure it out. What version of NP++ are you using?
06/01/2009 - 11:10
Thanks, I'm currently using NP v5.4 and like I mentioned I did a complete fresh install to ensure it wasn't a problem that I had created for myself. The only difference that I have made to the installation is that I told it not to use %APDATA during the installation.
Hope that helps, and thanks for your reply.
06/02/2009 - 13:18
I think I found the problem. I believe you're using the keystroke control-shift instead of control-Alt. If you use control-shift, you get the EOT and SOH characters. If you use control-Alt, everything seems to work fine.
06/12/2009 - 01:27
Hi,
Can we do a comparison between the SVN version of the file and the local(edited) version of the file, via this plugin?
And also how about check-out and check-in?
Thank you very much!
06/22/2009 - 10:32
win7 7232 x64
TortoiseSVN-1.6.3.16613-x64-svn-1.6.3.msi
Could not locate tortoiseSVN
i need help
06/25/2009 - 11:48
having same problem with winxp x64
TortoiseSVN-1.6.3.16613-x64-svn-1.6.3.msi installed
06/25/2009 - 14:55
The plugin uses a registry key to determine where Tortoise is installed. I've installed 1.6.3 and the key exists, so the function call requesting the registry value might not work under a 64 bit OS. Unfortunately, I don't have access to a 64 bit OS to test. I'll hunt one down and try to find the problem.
06/26/2009 - 18:35
gracias, muchas gracias amigo.
Add Comment
[language] [/language]
Examples:
[javascript] [/javascript]
[actionscript] [/actionscript]
[csharp] [/csharp]
See here for supported languages.
Javascript must be enabled to submit anonymous comments - or you can login.