Lusci - A Scite with many Lua extensions

92 views
Skip to first unread message

andrew strain

unread,
Aug 10, 2022, 11:33:59 PM8/10/22
to scite-interest
Hello All. Thankyou for accepting my request to share this with the group.
Over years of customising Scite, I have accumulated around 5-10 Kloc of lua script extensions. So I have made a project of fixing and fitting them into a pre-configured install which others can test and fork, without too many bumps, hopefully.

At the core 'Lusci' includes a module which efficiently checks any keypresses and runs functions which have been registered to their key combinations.
For example here is a function which removes trailing whitespace:
```
function deleterightwhite() -- uses core function 'filtertext'
  filtertext(
    function(c) return c:gsub("[^%S\r\n]+$", "") end
   ,"sa" -- filter ("s")election or ("a")ll or ("w")ord or ("l")ine
  )
  return true -- true disables normal action for key
end

```
And then one line can register it to a key combo:
```
lusci_command("del trailing whitespace|deleterightwhite|ctrl+alt+t")
```
That particular hotkey is not included in the install, yet it would be
easy to drop in. There are many others to use or modify. Lusci's default
keymap and features are currently documented at some length at the bottom
of the project Readme.md

Lusci makes Scites output pane more terminal like, with a simple path prompt,
system commands, and 'lusci commands' and ability to run lua snippets.
For example a command called 'pallet,' instantly flips theme luminosity
or visually adjusts theme contrast brightness etc.
All lusci commands can be abbreviated to first two letters and are followed by a comma to distinguish them from terminal commands.

ctrl+tab, cycles through most recently dwelled buffers which is refined to work nicely
ctrl+`, brings up a sorted file switcher modal
Lusci remembers all files ever opened and has commands to quickly find, list and reopen files. On Linux, protected files can be saved with entering sudo password, and sudo commands can be run too.
Lusci has commands to quickly search or replace terms in files and directories and list them within the output pane, quite like vanilla scite, just without modals and with some possible refinements.
Buffers can be transparently encrypted, with a cypher implementation which is  probably not secure but is non-trivial to recover.
And there are some more features and curiosities.
...
Lusci configs for Windows and Linux are hosted at :
https://codeberg.org/lusci/lusci

The Windows config is missing a couple of features, but I can add them soon if there is any interest.
I hope this post has not been too long. I have briefly set up a little board for possible Lusci chatter too.

Many Thanks,
Andrew
Reply all
Reply to author
Forward
0 new messages