Tuesday, August 9, 2011

Notepad++ for ColdFusion

Update 10/30/2013:
The nppColdFusion plug-in no longer works as of Notepad++ 6.x.x. The notepad++ folks changed the way plugins hook into the app. Ben Blumel stopped developing nppColdFusion in May 2012. If you use the installer links and instructions below for the earlier Notepad++ version, everything still works.

I have been a devoted user of Textpad for several years as a quick alternate to Dreamweaver, but have been frustrated lately with its 60+ second load time when using network paths. I was reading an article about Adobe Edge today and noticed a number of people mentioning Notepad++ in the comments, so I decided to check it out. Tweaking it for my needs was not 'out of the box'. So this is a recap of what I did:

Download the following:
Notepad++ 5.9.3
Download Page:http://notepad-plus-plus.org/download/v5.9.3.html
Installer: http://download.tuxfamily.org/notepadplus/5.9.3/npp.5.9.3.Installer.exe

nppColdFusion plug-in (Ben Blumel)
Download Page: https://bitbucket.org/bbluemel/nppcoldfusion/downloads
Archive: https://bitbucket.org/bbluemel/nppcoldfusion/downloads/nppColdFusion-0.7.1.zip

sqlLite dll (Required by nppColdFusion)
Download Page: http://sqlite.org/download.html
Archive: http://sqlite.org/sqlite-dll-win32-x86-3070701.zip

Installation
  • Install Notepad++ (this is straightforward)
  • Extract nppColdFusion.dll from nppColdFusion-0.7.1.zip and place it in the %programfiles%\Notepad++\plugins folder
  • Extract nppColdFusion.db3 and nppColdFusion.xml from nppColdFusion-0.7.1.zip (/Config folder) and place them in the %appdata%\Notepad++\plugins\config folder
  • Extract sqllite3.dll from sqllite-dll-win32-x86-3070701.zip and place it in the %programfiles%\Notepad++ folder
  • Open (or Restart) Notepad++
At this point your Notepad++ installation has ColdFusion code hints and coloring. 

image


...but if you're like me, you might like to see a directory tree on the left.

Configuration (Directory Tree)
  • Click [Plugins] --> [Plugin Manager] --> [Show Plugin Manager]
    • If you are behind a proxy, open a CMD.exe window as administrator and execute the following:
      • C:\Program Files (x86)\Notepad++\updater\gup -options
    • Enter proxy and port information and click [Ok]
    • In Plugin Manager, click settings. 
    • For authenticating proxy, enter proxy address in the format: username:password@proxyaddress and click [OK]
  • Scroll down to "Explorer" and check it. Click [Install]
  • When prompted, click [Ok] to restart Notepad++. When Notepad++ comes up, the file tree is hidden by default.
  • Click [Plugins]. Notice that [Explorer] is now an option
image
  • Click [Plugins]-->[Explorer]-->[Explorer...] and the file tree appearsimage

Enjoy!

13 comments:

  1. fantastic! I was looking for a Coldfusion plugin for Notepad++ and your blog came up in search results.

    ReplyDelete
  2. Hi Brien,

    Thanks for posting this, most appreciated. Always good to see people out there using it and writing up about it.

    Unfortunately Plugin Manager has been quite far behind for months, hopefully that's going to change soon as there's a new way of managing plugins.

    However to address the convoluted install steps I have created an install script which does all the leg work for you (even downloading the sqlite and nppColdFusion).

    Be sure to check out my other plugin IndentByFold ( https://bitbucket.org/bbluemel/indentbyfold/overview ), which works rather well with nppColdFusion. The install for that is less cumbersome (put the dll in the plugins directory, and disable Notepad++'s built in Auto Indent in the settings).

    Thanks again.

    Ben

    ReplyDelete
  3. Thanks for posting this info. Few questions. I don't have a Config folder in my Plugins directory. I created one, but I get an error on Notepad++ startup: ListAll Tags length is 0.

    I looked around and saw some xml files in the API's directory, so I put it in there, but that didn't fix it. I'm not seeing any of the CMFL tags coloring. I'm using the most recent installer (5.9.4) any thoughts?

    ReplyDelete
  4. @Ben Thanks for simplifying the process!

    @Eric Blog posts like these age quickly, and based on Ben's comment and yours, this one has already aged out. I haven't yet installed 5.9.4 myself - in fact, I haven't even tested Ben's installer that he mentions above!

    Notepad++ has a very large, strong community. Drop your question into the help forum and I'm sure someone will get back to you quickly: http://sourceforge.net/projects/notepad-plus/forums/forum/331754

    ReplyDelete
  5. Hi Eric,

    The "ListAll Tags length is 0" is caused by the plugin not being able to access the sqlite database, most common cause is having put the config folder in c:\Program Files\Notepad++\plugins\ rather than in the one for application data, this is:
    For XP: c:\Documents and Settings\\Application Data\Notepad++\plugins
    For Vista/7: c:\users\\AppData\Roaming\Notepad++\plugins

    Either way you can get to this by pressing the Windows Key and R to bring up the Run dialog, and typing in %appdata%\Notepad++\plugins.

    Will change the dialog to be more descriptive in the next release. As I notice quite a few people are searching for it now.

    Or of course use the Install-nppCF script.

    Cheers

    Ben

    ReplyDelete
  6. Brien,

    I was apparently wrong...I didn't read the instructions carefully enough and was trying to put the config file in the C:\Program Files (x86)\Notepad++\plugins directory. Once I saw that it belongs in %appdata%\Notepad++\plugins\config, everything started working correctly.

    Awesome work, much appreciated!!

    ReplyDelete
  7. notepad++ 5.9.8 breaks this plugin and says it isn't compatible. then after fiddling around with it, a new error message says "This ANSI plugin is not compatible with your Unicode Notepad++" and asks to be removed.

    ReplyDelete
  8. Is there a procedure to intall the ColdFusion plugin that works with the current version of NotePad++ ? After attempting it without success, I tried following the install for version 5.9.3 and could not get it to work either.

    ReplyDelete
    Replies
    1. Hey William - sorry... I know this reply is coming over a year later, but no. Notepad 6.x broke nppColdFusion and Ben is no longer doing development work on the plugin.

      Delete
  9. Its a superb blog. Thanks for it.

    ReplyDelete
  10. Just came on this thanks for the info

    ReplyDelete
  11. Really appreciate the post. Works like a charm.

    I'm spreading the word here at work!

    ReplyDelete