[Plugin Update] LuaScript v0.9 (Supports Scintilla v4.1.4)
LuaScript v0.9 has been released and can be downloaded here
With Notepad++ upgrading its internal Scintilla version, LuaScript is also getting an update to support the numerous new features provided by Scintilla. LuaScript is a plugin for adding Lua scripting capabilities to Notepad++. This provides control over all of Scintilla’s features and options with a light-weight, fully-functional programming language. For an overview, see the readme.
The overall mechanics of the plugin are the same, however it now includes the updated Scintilla API. This will have to be installed manually until it gets into the plugin list in another release or two of Notepad++.
Now time for some examples of the new Scintilla API…
Using this LuaScript
npp.AddShortcut("Selection Add Next", "Ctrl+D", function() editor:MultipleSelectAddNext() end)
It is possible to select several instances of the same word (great for editing variable names…or using it with the SurroundSelection or BetterMultiSelection plugin).
Now whitespace can only be set to show it in the indentation using:
editor.ViewWS = SCWS_VISIBLEONLYININDENT
Notepad++ can now have multiple edge lines:
editor.EdgeMode = EDGE_MULTILINE editor:MultiEdgeAddLine(40, 0x0000FF) editor:MultiEdgeAddLine(60, 0x00FF00) editor:MultiEdgeAddLine(80, 0xFF0000)
Tabs can now be drawn so that they aren’t quite as intrusive:
editor.TabDrawMode = SCTD_STRIKEOUT
Any many other Scintilla features.
As always let me know if you run into any issues.
Thank you for providing some information about useful new features in Scintilla at a glance. Especially
MultipleSelectAddNextis really useful.
This touches something I thought about a few days ago when I first read about the Scintilla update in the upcoming version of Notepad ++: The update alone is not so useful if the new Scintilla features in Notepad++ are not available. But to make them available, we need to know about them and we need a wish list for features that we would like to have integrated into Notepad++.
So the first question is where is it possible to get compact information about new Scintilla features added since v3.56?
we need a wish list for features
Yes there are tons of new features that can be added to Notepad++. I think for the short term it is best to make sure it is stable and provides the same/better capabilities as previous versions. Going from Scintilla v3.5.6 to v4.1.4 was a huge jump. But I agree all the new features need evaluated to see what is worth integrating (this is the main reason why I wanted to get the updated LuaScript out ASAP so it gives a tool to experiment with the updated API)
where is it possible to get compact information about new Scintilla features added since v3.56
It also includes the changelog for Scite and some of the other supported platforms (Qt, GTK, Cocoa, etc) but alot of them are Scintilla specific.
As a brief example (don’t wanna hijaak this thread, maybe a new highly focused thread on the subject is needed): If I create several different carets by ctrl+clicking, in N++ 7.6.6 if I then press an arrow key, I am back to a single caret…but in 7.7 the multi-carets stay and move around as a group with arrowing around…but I notice that they don’t keep their relative positions if they cross, say an empty line during the movement. Is this how it is supposed to be? Is the only way to get a single caret back from this situation is by clicking the mouse at a different point?
That was a lot of text to not be hijaaking this thread. ;)
Is the only way to get a single caret back from this situation is by clicking the mouse at a different point?
No, press ESC :-)