Menu

NPP support added to Ndexer

2009-05-28
2012-11-13
  • Dejan Kozina

    Dejan Kozina - 2009-05-28

    Hello all.
    I've just successfully scratced an itch and want to share this should somebody find it useful.

    Ndexer [http://code.google.com/p/ndexer/] is an open source code search program based on ctags and SQLite. Once it has initally scanned the folders you select it is remarkably fast at finding stuff - you just launch either 'Search Tags' or 'Search Files', start typing and it will find every file (and line number) that includes the searched tag. More, double-clicking on the result preview opens the configured default editor at the correct line number. As long as the editor is one of SciTE, TextPad or VisualStudio... You may already have guessed where is this going to end.

    To add NPP support what you'll need is a SVN client to get the source code (TortoiseSVN is fine), a decent text editor to modify it (no prizes for guessing... :-)) and VisualC# Express to compile the thing (free from MS at http://www.microsoft.com/express/vcsharp/\).

    Step by step:
    1) Use your Subversion client to export the source code from http://ndexer.googlecode.com/svn/trunk/ to a folder of your choice;
    2) In the TextEditors folder make a copy of TextPad.cs and call it Notepad++.cs;
    3) Open this file in NPP a change as follows:
        a) line 11 - change the string 'TextPadDirector' to 'NotepadPlusDirector' (C# doesn't like plus signs in its source files)
        b) line 12 - same as above
        c) line 21 - change the string 'TextPad4' to 'Notepad++'
        d) line 37 - change the whole line to
                        Launch(String.Format(" -n{1} {0}", filename, initialLineNumber));
        e) save and exit
    4) Install Visual C# Express (may take a while) and launch it. Once started select to open an existing project: select 'Ndexer.csproj' from the source folder;
    5) Press F5 to compile (ignore the alert about the missing database parameter). The compiled ndexer.exe is in the obj/debug folder;
    6) Download the original Ndexer from Google Code and expand into a folder;
    7) Overwite the original ndexer.exe with the one you just compiled;
    8) Launch Ndexer (you're supposed to supply a database name as an argument - this means you either launch it from the command line as in 'ndexer.exe index.db' or make a shortcut to it and add the database name modifying the shortcut;
    9) Configure the folders and file types to be scanned right-clicking on the tray icon and selecting 'Configure'; in the 'UI' tab select NotepadPlus and set the editor's location.

    That's all, folks. Start searching and have fun .

    djn

     
    • Dejan Kozina

      Dejan Kozina - 2009-08-26

      Edit: this sourceforge wizard thing has included the end dot when converting the link posted above. The filename is obviously ndexerk.zip (no dot at the end - remove it manually).

       
    • Ömer Sinan Kaya

      it would be nice if someone put the binary on a server

       
    • Dejan Kozina

      Dejan Kozina - 2009-08-26

      The author of Ndexer seems to be in no hurry to add NPP support, so I've put the compiled binary online at http://kozina.com/stuff/ndexerk.zip.
      Full sources available as per the GPL v.2 (see included README.txt).

       
  • Dejan Kozina

    Dejan Kozina - 2010-04-04

    One hour ago the author of Ndexer ( http://code.google.com/p/ndexer/ ) has uploaded a new version and it supports Notepad++ natively. Works just fine. Paint me happy :-).

     
MongoDB Logo MongoDB