• Shortcuts : 'n' next unread feed - 'p' previous unread feed • Styles : 1 2

» Publishers, Monetize your RSS feeds with FeedShow:  More infos  (Show/Hide Ads)


Date: Thursday, 19 Nov 2009 22:54

Now that the Mercurial code move is over and a whole bunch more bugs have been worked out, I’m happy to announce the first 2.1 testing release that’s being signalled for downloads. The new build is also available for download here:

Download 2.1.1.2047 Installer
Download 2.1.1.2047 Portable

In case you haven’t been keeping up with the various announced changes, 2.1 has these headline features:

  1. Full Unicode Support
  2. Support for Translations – PN in your language
  3. Prototype Command Bar feature (with PyPN)
  4. Multiple simultaneous selections, including typing into block selections
  5. Virtual space

There are also a lot of bug fixes, smaller improvements and extensions interface improvements. This release of 2.1 is close to what I want to release as the new stable build as soon as it’s proven at least as stable as 2.0.10.

Author: "Simon" Tags: "PN, PyPN"
Comments Send by mail Print  Save  Delicious 
Date: Thursday, 19 Nov 2009 22:44

I’d like to introduce you to a new Google Code project, pnotepad-plugins. If you can’t tell from the name, this is a contributors-welcome project for Programmer’s Notepad plugins. Everything you need to make plugins using Visual Studio (Express should be fine) in one repository. The repository is stored in Mercurial so you don’t even need to be a project member to use/fork/branch the code.

The first plugin in pnotepad-plugins is TextUtil, it serves not only as an example but also hopefully as a useful plugin too. The first release of TextUtil is now available, and comes with the following commands:

  • Sort Lines
  • Copy Marked Lines
  • Cut Marked Lines
  • Bookmark Marked Lines
  • Marked Ranges to Selections
  • Selections to Marked Ranges
  • Smart Highlight to Selections
  • Smart Highlight to Marked Ranges
  • Reverse Selection(s)

I’d love to see people store their plugin code in this project, and move things forward.

Download TextUtil 0.1 for PN 2.1 now.

To get started just drop textutil.dll in your Programmer’s Notepad directory, and run pn --findexts.

Author: "Simon" Tags: "PN"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 03 Nov 2009 21:59

A user opened a bug asking me to look into a new way of replacing notepad.exe with PN. Previous methods have involved a small program that pretends to be notepad.exe but actually launches PN. This has a number of problems:

  1. Replacing system files like notepad.exe on modern Windows is much harder due to System File Protection
  2. Many tools expect notepad.exe to hang around until you save the file, meaning they can pick up the changes when you’re done. The notepad.exe replacement exited having launched PN so didn’t work well with this.

The new technique involves using something called Image File Execution Options. This is a set of registry settings used to make Windows run a debugger automatically when a program is launched. We can piggyback on this to run PN instead of notepad when it’s launched.

Steps

1. Create this Registry Key:

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\
Image File Execution Options\notepad.exe

2. Add a string value called “Debugger”, set the value to:

c:\Program Files\Programmer's Notepad\pn.exe --allowmulti -z

The –allowmulti deals with the second problem listed above, making sure that even if PN is already running a new instance is started – this means that the calling process can wait for PN to exit. The –z tells PN to ignore the next parameter, which when using Image File Execution Options is the process name that we’re replacing – the full path to notepad.exe in this case.

This is only available in the lastest 2.1 testing release for now (1117), but should be ready to try. Let me know how you get on.

 

Note that if you’re on 64-bit Windows you’ll need the following Registry Key instead:

HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows NT\
CurrentVersion\Image File Execution Options
Author: "Simon" Tags: "PN"
Comments Send by mail Print  Save  Delicious 
Date: Monday, 02 Nov 2009 17:42

This is probably only of interest to those who use the PN source code,
if you don’t then feel free to move right along!

Now that Google Code supports Mercurial for source control I’m considering whether to move PN to this. Mercurial provides a much better model for managing Open Source project source control as it allows each user to maintain a local set of changes with full change history without needing project approval for commits. Any changes that the project is interested in taking can then be pulled into the main project tree.

Unless there are any major objections to the move I’ll start working on the import soon. The source at it’s final subversion revision will remain available in subversion indefinitely, but new commits will only go to the mercurial repository.

More on Mercurial:

All feedback welcome, here or in the forums.

Author: "Simon" Tags: "PN"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 13 Oct 2009 22:06

Version 2.1 introduces a new prototype feature called the Command Bar. The Command Bar enables modal editing control, allowing advanced keyboard control of the editor – the initial implementation adds some simple VI-style commands.

The handling for the commands is entirely implemented in PyPN, and it’s designed so it’s easy for you to extend and test your extensions immediately. Just edit commands.py and run it as a script and the command handling is updated.

The look and feel will obviously be worked on over time, but this version will be in the forthcoming testing release and can be enabled from the options if you have PyPN installed. This quick video doesn’t show you all of the features already supported (skipping search and some other combination commands) but gives you a feel for what can be done.

Author: "Simon" Tags: "PN, PyPN"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 18 Aug 2009 18:53

Guess what?! I haven’t been idly waiting for the stable release to go gold. Instead I got my head down and spent a lot of hours fixing up the Unicode conversion of Programmer’s Notepad. Long overdue, PN 2.1 will be full-unicode but there’s more than just that. Here’s the list of features in the build I’m currently dogfooding:

  1. Full Unicode Support
  2. Support for Translation – PN in your language
  3. Multiple concurrent selections, and block typing
  4. Virtual space

Full Unicode Support

This support extends right the way throughout Programmer’s Notepad, meaning you can now have projects containing complex-script filenames, search for and find Japanese text in your document, and insert Chinese text from your text clips. I’m sure there will be a few bugs in the unicode support, but they’ll be much easier to fix now this work is done.

Translation

I’ve wanted to do this for a long time, and finally found the time and inspiration (plus the prerequisite Unicode support). Version 2.1 supports translations built into fast, small, Windows-standard resources – no runtime string remapping. Translations, however, are performed using the industry and open-source standard PO file format meaning lots of good tools for maintaining the translations. Each translation is then transformed into a Windows-standard resource DLL by black magic, or something like that anyway – I’ll detail this further later.

Want to get your translation in for 2.1? Get started translating PN.

Multiple Selections, Block Typing, Virtual Space

I’ll probably write some more about this at a later stage, but fantastic upstream changes in Scintilla are coming to you in PN 2.1. You can now Ctrl-Click to set multiple insertion points, or Ctrl-Drag to create multiple selections. With multiple insertion points you can type and the same text will be inserted at each point. Virtual Space has been requested so many times I’ve lost count, and finally this release brings it to you.

Screenshot Anyone?
These claims would be worthless without a released build or proof right, so here’s your screenshot:

Programmer's Notepad 2.1 Pseudo-Localised Build

Programmer's Notepad 2.1 Psuedo Localised Build

This build is running with a pseudo-localised language meaning that I can check where strings still need localising. You’ll see there are a bunch still to do, but progress is being made. You can also see a three-line insertion point where I’ve just typed a sentence once and had it appear in three places (this never gets old). Finally the projects window is showing a project containing a Japanese filename – I have no idea what that file is called, but I do know I can save and load the project and file, and can find that text in that file. For those of you who regularly work with non-English text this is huge.

I just have to add the UI to enable language switches and store the configuration, and I’ll release a new testing build – watch this space.

Author: "Simon" Tags: "PN"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 18 Aug 2009 18:35

There have been no show-stopping issues found in 2.0.10.1010 so I’m very happy to finally declare a new stable release. There will probably be an update for this build at some point in the near future to fix a couple of minor issues and also to test the auto-update system for stable release users.

If you’ve been holding off from testing releases, now is a great time to download the new stable release!

Thanks to all the testers, forum users, bug reporters and patch submitters for making 2.0.10 a great release. If you’re still using 2.0.8 here are some of the highlights:

  1. Vastly improved regular expressions support
  2. Explorer view
  3. Open files view
  4. Vista-behaviour improvements
  5. Win7 Support
  6. API file autocomplete
  7. SDK for building extensions
  8. Style presets
  9. Macro/Script recording with PyPN
  10. Smart Highlight to show all instances of selected word
  11. Loads of bug fixes, and a bunch more new features
Author: "Simon" Tags: "PN"
Comments Send by mail Print  Save  Delicious 
Date: Friday, 24 Jul 2009 12:22

Programmer’s Notepad 2.0.10.10 is now being signalled as a stable update to test the update mechanism. It’s been signalled for those checking for testing releases for the last few days and no show-stopping bugs have been found. Those with the default update check settings will now get this build in the next few days.

Note that this doesn’t mean this is the final stable build yet, although I have high hopes. I’ll leave it a few days longer before actually declaring the build stable for public consumption.

Author: "Simon" Tags: "PN"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 21 Jul 2009 21:11

This post is probably only of interest to those playing with or working on the code for Programmer’s Notepad.

Programmer’s Notepad 2.0.10 RC is now out, and with that the code has been branched in subversion to the rel-2-0-10 branch.

This means that the trunk is open for big changes again, and there are some relatively big changes on the way – in fact for the next few weeks expect the trunk to be broken fairly often. Here are the changes coming in:

  1. Fixing the Unicode build – 2.1 will be released as a full Unicode rather than mixed mode build
  2. Updating to the newest Scintilla code, error handling model has changed completely
  3. Moving to Visual Studio 2008 SP1 for development instead of 2005
  4. Updating Boost to latest release

Apart from this (!) I don’t intend on taking many changes before 2.1 is released. You can see the current suggested list of items to fix in the tracker: Ellington Issues.

Author: "Simon" Tags: "PN, vc++"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 21 Jul 2009 20:55

This is the release candidate for Programmer’s Notepad 2.0.10 – a new stable build!

Almost all changes since build 970 are minor fixes, with the exception of the additional support for XML API files (supporting Notepad++ format). Providing no major issues are found, this will become the stable release, and I plan to test the update mechanism for stable builds soon by signalling this as the new stable build.

Downloads:

2.0.10 RC Installer
2.0.10 RC Portable Zip

Changes in this build:

  1. Find word under cursor updates user search options
  2. Allow all mini toolbar buttons to live on the main toolbar (#446)
  3. Fix a leak with huge find in files matches.
  4. Fix line numbers when very long lines are in the source files (#129)
  5. Fix find next across multiple documents (#510)
  6. Fix multiple file opens from exporer (#508)
  7. Enable api-based autocomplete supporting notepad++ format (#142)
  8. Updated D language keywords and other bits (#484)
  9. Manual “Check for Updates” command under Help (#469)
  10. Mini toolbar slightly too small (#461)
  11. Disable properties controls when write-protect is enabled (#449)
  12. Fix inconsistent spelling of colour in options dialog
  13. Support word wrap in output window (#382)
  14. Avoid win7 bug hiding find in files dialog (#488)
  15. Make sure readonly is disabled during revert (#380)
  16. Provide option to disable mini toolbar (#470)
  17. Try to fix mini toolbar button size issue (#501)
  18. 24-bit images for mini toolbar where high colour is not supported (#342)
  19. Fix crash when finding with no text (#463)
  20. When close on Find Next is disabled, really don’t close (#473)
  21. Remember the last goto line
  22. Avoid a bug when reading invalid ini sections (#443)
  23. Fix bug preventing copy from output window (#412)
  24. More low-colour toolbar images for downlevel OS support (#518, #513)
  25. Minor const correctness fix for extensions

Thanks to all the users who have put time and effort into reporting and following up on bugs, testing, and contributing patches.

Author: "Simon" Tags: "PN"
Comments Send by mail Print  Save  Delicious 
Date: Wednesday, 13 May 2009 09:07

Like the idea of using Python scripts to enhance Programmer’s Notepad but not sure where to start? James Yoneda has created the awesome ScriptShare website for exactly this purpose:

Scriptshare in Google Chrome

Scriptshare in Google Chrome

There are a bunch of scripts already there, and hopefully you will add yours too! We’re working on getting this moved over to pnotepad.org eventually.

My thanks to James for putting this effort in and creating such a useful site in such short time!

Author: "Simon" Tags: "PN, PyPN, python"
Comments Send by mail Print  Save  Delicious 
Date: Wednesday, 13 May 2009 08:58

I’m happy to announce a minor bug fix release for PyPN, the Python extension for Programmer’s Notepad. This release fixes a PN crash if you tried to create a Scintilla object with no active document, and also the exception syntax problem preventing PyPN from working in Python 2.4-2.5.

Downloads

Author: "Simon" Tags: "PN, PyPN, python"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 12 May 2009 20:57

The latest testing release of Programmer’s Notepad is out. This is a minor release with a few important bug fixes, including Unicode file handling, Windows 7 RC quirks, and a couple of toolbar appearance issues. All testing release users should upgrade to this new build.

Downloads

Thanks to all the users who have put time and effort into reporting and following up on bugs, testing, and contributing patches.

Author: "Simon" Tags: "PN"
Comments Send by mail Print  Save  Delicious 
Date: Saturday, 02 May 2009 22:00

The latest testing release of Programmer’s Notepad is out. This release brings a whole bunch of great changes: Script (macro) recording when using PyPN, a customizable toolbar, firefox-style tab ordering and smart highlight. There are also a load of bug fixes too.

Downloads

There is also a new PyPN release fixing a couple of issues with the included scripts from the last build:

Thanks to all the users who have put time and effort into reporting and following up on bugs, testing, and contributing patches.

Author: "Simon" Tags: "PN, PyPN"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 10 Mar 2009 20:35

A little while back I asked people a couple of questions to help guide future PN development.

The results ended up looking like this:

Is the fact that you can float PN document windows useful?

This question is concerned with whether the MDI window management system is helpful to people. I suspected that most users had windows maximised all the time and used the tabs to switch – i.e. MDI wasn’t buying them much. Here are the results:

Results of MDI Poll

18% of people were using the abilities of MDI windows and were very happy about them. Pretty much everyone else doesn’t care or would rather be able to split the view.

Don’t worry, this isn’t going to drive any instant knee-jerk changes, but I’m keeping it in mind for future design work. I am definitely going to address the lack of split views, I’m just trying to decide how.

Do you use the individual output windows?

Here I wondered whether the hidden away option to use individual output windows instead of the global one for each window was actually being used – I suspected not. I was wrong!

Individual Output Poll Results

Lots of people use the individual output windows, and it appears lots of people have no idea what output windows are! I’m not sure whether this is because they have no need in their editing for tools and output, or are just unaware of the features.

I’ll be posting some more questions soon, and wanted to thank everyone who took the time to answer these polls or comment – it’s appreciated!

Author: "Simon" Tags: "PN"
Comments Send by mail Print  Save  Delicious 
Date: Thursday, 19 Feb 2009 22:05

This is a minor bugfix testing release for Programmer’s Notepad, fixing a few niggles with the last release.

Downloads

There is also a new PyPN release fixing a couple of issues with the included scripts from the last build:

Thanks to all the users who have put time and effort into reporting and following up on bugs, testing, and contributing patches.

Author: "Simon" Tags: "PN"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 17 Feb 2009 12:00

This is the second post in the Writing your First Extension series. You can see the full article here: Writing Your First Extension.

Menu items are added via the IPN object provided at extension load time. You add menu items by providing an implementation of IMenuItems. Here is a very simple implementation supporting a single item:

class Menu : public extensions::IMenuItems
{
public:
    Menu()
    {
        memset(&item1, 0, sizeof(item1));
        item1.Handler = &MyExtensionFunc;
        item1.Title = L"Hello World";
        // item1.Type = extensions::miItem;
        // item1.UserData = 0;
    }

    /**
     * Get the number of MenuItem instances that can be retrieved.
     */
    virtual int GetItemCount() const
    {
        return 1;
    }

    /**
     * Get an individual MenuItem instance by index.
     */
    virtual extensions::MenuItem& GetItem(int index) const
    {
        if (index == 0)
            return const_cast<extensions ::menuitem&>(item1);
    }

private:
    extensions::MenuItem item1;
};

This very simple implementation adds a single menu item called "Hello World". When the item is selected, the MyExtensionFunc method will be executed by PN.

It might seem like a fair bit of code to add a menu item, but in the next SDK version I’ll provide a general-purpose helper to make this easy. The reason for the interface is to make it easy for you to provide sub-menus. MenuItem instances can contain child items by changing Type to miSubItem and filling in the SubItems member with another instance implementing IMenuItems.

The handler method looks like this:

void MyExtensionFunc(extensions::cookie_t /*cookie*/)
{
    g_PN->GetGlobalOutputWindow()->AddToolOutput("Hello World!");
    g_PN->ShowOutput();
}

Once you have your handler and IMenuItems implementation, you just need to tell PN about your items. In your init function you need something like this:

bool __stdcall pn_init_extension(int iface_version, extensions::IPN* pn)
{
    if(iface_version != PN_EXT_IFACE_VERSION)
        return false;

    g_PN = pn;

    Menu menu;
    pn->AddPluginMenuItems(&menu);

    return true;
}

Now you have Programmer’s Notepad presenting your commands in the menu and can handle their selection. Next time we’ll look at the other events PN lets you attach to.

Author: "Simon" Tags: "PN"
Comments Send by mail Print  Save  Delicious 
Date: Monday, 16 Feb 2009 12:00

PyPN provides a great way to add functionality to Programmer’s Notepad by writing simple Python code, but you might want to do something more advanced. For this there’s the Programmer’s Notepad Extension SDK.

The SDK lets you extend PN using C++, allowing you to react to editor events and provide new commands in the menu. PyPN is itself implemented as an extension using this same SDK, and you can use the SDK to provide support for other scripting languages too.

What You’ll Need

You need a Windows C++ compiler and the Boost C++ library. Note that you don’t need to compile any of boost, we use the header-only bits.

I suggest using the free Microsoft Visual C++ Express if you don’t already have Visual Studio, this should guarantee compatibility.

Getting Started

Download the SDK and copy the template project, this is a good base for your extension. Note that the SDK also contains a demo extension showing use of various parts of the SDK. Change the name and version of your extension and you’re ready to add it to Programmer’s Notepad for the first time:

void __declspec(dllexport) __stdcall pn_get_extension_info(PN::BaseString& name, PN::BaseString& version)
{
    name = "My First Plugin";
    version = "1.0";
}

Compile the extension and place the .dll file in your PN directory. Now run “pn –findexts” and your plugin will be discovered and loaded the next time you start PN. Go to Tools->Options->Extensions and see your extension listed.

Everything else you want to do flows from the instance of IPN that’s passed to your init function. This interface gives you access to the open documents, lets you sign up to handle document events and gives you access to app-level services like script registration, find in files and options management.

Working with Documents

Everything you want to do with an open document is done through the IDocument interface. You get a pointer to one of these from your IPN instance by calling GetCurrentDocument, NewDocument or equivalent.

    // Make a new document
    IDocumentPtr doc = pn->NewDocument(NULL);

    // Send scintilla messages (see scintilla.org documentation)
    doc->SendEditorMessage(SCI_APPENDTEXT, 6, (LPARAM)"Hello!");

    // Save changes
    doc->Save("c:\\temp\\test.txt", true);

    // Done with the document
    doc->Close();

This is the first in a series of posts that will become the introductory documentation for extensions. Next time we’ll look at how to add menu commands for your plugin. The series will be added to the docs site as we go: Writing your First Extension

Author: "Simon" Tags: "PN, vc++"
Comments Send by mail Print  Save  Delicious 
Date: Wednesday, 11 Feb 2009 21:48

The latest testing release of Programmer’s Notepad 2 is finally out. There are plenty of fixes in this release, and a few minor new features too. Of particular note are the following:

  1. Updates to the extensions interface allowing extensions to create menu items
  2. International input fixed (I know this will please a whole bunch of users)
  3. Read only edit protection cleaned up
  4. More text transforms, also available from context menu
  5. Tab to space and vice versa conversions fixed
  6. Notepad’s .LOG feature natively supported
  7. Fix a problem using PN on the Windows 7 beta causing PN to hang on exit

Downloads

There is a new PyPN release supporting the updated plugin interface:

Thanks to all the users who have put time and effort into reporting and following up on bugs, testing, and contributing patches.

Author: "Simon" Tags: "PN, PyPN, python"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 20 Jan 2009 22:24

I want to get a feeling for how some controversial features and configuration options in Programmer’s Notepad are used so that I can better work out where to spend my time. To do so, I’m going to run some polls and spread the word about them as widely as possible. You can really help both me and Programmer’s Notepad to improve by voting in these polls.

The first is to find out how you use the output window:

and the second is about the MDI window framework that PN uses:

Author: "Simon" Tags: "PN, poll"
Comments Send by mail Print  Save  Delicious 
Next page
» You can also retrieve older items : Read
» © All content and copyrights belong to their respective authors.«
» © FeedShow - Online RSS Feeds Reader