My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
StartPage  
This is the start page of morenppkomodo, repeating the summary and adding some discussion.
Featured
Updated Feb 4, 2010 by vacuu...@gmail.com

More NPP Komodo

Introduction

(taken from project summary):

Morenppkomodo is a Komodo XUL extension, which transfers some functionality from Notepad++ to Komodo, like duplicating selection (line if nothing selected), etc..

Here you find a project made using the Komodo Extension template in Komodo Edit 5, which can also be built in Komodo Edit 5. As such it may be of use as a starter example for Komodo / XUL development for newbies such as myself :)

The project is a scaled down version of the Komodo extension Dafizilla : MoreKomodo. It also ports a few lines of Scintilla related code from .:: NOTEPAD++ ::.

Download the extension at rev2 = v.0.1 morenppkomodo-0.1-ko.xpi

Latest: morenppkomodo-0.1-ko.xpi

So far, this is intended just as an archive, without further development, although I may add some changes later.. If anyone thinks this is a good base for further development, and would like to take over - just send back some contact info.

Discussion

Well, I'm a user of .:: NOTEPAD++ ::. (and before that, Notepad2) on Windows, and what I liked was that these were small and fast programs, with syntax coloring, possibility to change encoding and line endings, handling of binary files too, regex search/replace and other nice facilities; among the nicest for me are:

- Ctrl-D gives duplication of selection or line if nothing selected - Ctrl-Shift-Up Arrow moves a line up - Ctrl-Shift-Down Arrow moves a line down

But eventually I need a cross-platform editor, and I like KomodoEdit (OpenKomodo) best, even though it is a slim IDE - and thus a "fat" text editor (at least some 100 MB on my machine - opposed to 6MB for Notepad++), and not as fast as the aforementioned ones. (Eventually, I guess I would love something like a slimmed down, "Komodo Pad" that would run only using XULRunner, without perl/python building support; possibly, the only thing needed for this is a Scintilla plugin for Mozilla, which is apparently possible, but not yet public - see Build scimoz and scintilla as ff3.0rc3 extension on windows ...)

However, one of the most irritating lack of facilities for a new convert from Notepad++ is the lack of duplicating and moving lines using the above shortcuts - apparently, I'm not the only one, as this discussion shows: Duplicate Line ? | ActiveState Community Site. Although this webpage offers a macro solution, I'd rather have something I'd be able to quickly port between platforms along with the keybindings - and so I thought a plugin would be quickest/most practical.

Installed Items

The plugin currently installs new items under the file menu for the three above commands, as well as keyboard shortcuts for them, as shown below:

Commented Items

However, the plugin has also some commented, non-working code too. I was missing a 'front-page' facility to check the encoding and line-endings format of a file, like the format menu in Notepad++. So, one portion of the commented code is a XUL representation of this menu item, as shown below:

Though, it turns out Komodo Edit has them too - except tucked away under File Settings:

And finally, some of this info is indeed on the front window also - right on the bottom task bar; however only Language (that controls syntax coloring) can be changed; not the encoding; and line-endings are not present.

So I tried to see if I can reference to the Komodo File Settings GUI, so as to include it in the extension - and it is possible, although wrong:

This code is also commented in the component, as referencing the File Settings window somehow includes it on the bottom of the main window; and the necessary scripts don't run either. The problem may be that those Komodo elements are defined as XUL windows, not XUL overlays (as they should be if one wants to share them as resources).

Still, possibly the best would be imply to allow encoding to be changed from the main window bottom taskbar, and add line endings to the same taskbar - however referencing the necesarry Komodo elements and functions is nonetheless still a problem.

What I'd also like to do

... and eventually (not related to this plugin, though):

  • Make a Scintilla plugin for plain XulRunner, and come up with a slim XUL text editor, based on Komodo Edit :)

but since there is not much time available, that is probably never going to happen :)

Note about portable install of Komodo Edit on Windows

Since Komodo Edit is distributed as a msi installer, one can always try to use msiexec on the command line, to perform a so-called Network or Administrative install (which installs to a folder) using the /a switch:

msiexec /a Komodo-Edit-5.0.3-2767.msi

This will install to a folder (on my PC, it chose C:\PREFS which didn't previously exist), and will install additional Windows files there if need be. This folder should then be portable anywhere, even a USB disk. Then the following batch can be used to start a portable install like this:

set KOMODO_USERDATADIR=F:\path\to\KomodoEditDataDir
komodo.exe %* -v

Sign in to add a comment
Powered by Google Project Hosting