Page 1 of 1

plugin Extended Selection

Posted: 18.11.2020 14:50
by Shovel
A plugin to streamline the introduction of copy-paste bugs.
Adds to usual double-click selection:

Shift+Double-click: includes additional characters to selection
Shift+Triple-click: "expression selection" (useful for selecting function call with arguments)

-----------------------------

Plugin has options in the config file, call menu item
"Options / Settings-pligins / Extended Selection":

Each lexer has following options:
"include_chars": additional characters to include in Shift+double-click selection.
"stop_ext": characters to stop Shift+triple-click selection when not enclosed in ()[]{}<>
"open_chars" and "close_chars": map of opening-to-closing and closing-to-opening brackets. Used to limit selection extension to stay within brackets, and to ignore "stop_ext" characters inside brackets, when they follow selected text.

For example when 'cc' clicked in following line:

Code: Select all

	aa = bb.cc<dd>(ee=ff) = ww

* normal double-click will yield selection:

Code: Select all

	cc
* addon's shift+double-click:

Code: Select all

	bb.cc
(period and adjacent text is added to selection because '.' is in the "include_chars" for this lexer)
* addon's shift+triple-click:

Code: Select all

	bb.cc<dd>(ee=ff)
(selection stops at equal-signs at both sides because '=' is in the "stop_ext" for this lexer. "stop_ext" characters ('=' here) are ignored inside brackets)

-----------------------------

Commands in "Plugins / Extended Selection" menu:

- "Toggle Selection"
Cycle through addon's double/triple-click selections.

-----------------------------

Author: Shovel (CudaText forum user)

Posted: 09.01.2021 17:32
by uvviewsoft
1) I suggest to add command to the plugin. so user can call "expand selection" via the command.
not only by dbl-click. this way plugin can be used w/o dbl-clicks.
2) consider to add Markdown features
https://github.com/Alexey-T/CudaText/issues/3015

Posted: 10.01.2021 15:18
by Shovel
> 1)
I added the menu entry. It cycles through modified double/triple clicks.

> 2)
With some modifications this plugin probably can be coerced into behaving somewhat similarly... but I don't think I will have that much free time in the near future.

Posted: 13.01.2021 12:00
by Shovel
Ok, added the readme. Please check it out, I think now readme and default config covers most things, and it seems like adding more info would only make thinks more confusing :) your opinion?
https://github.com/halfbrained/cuda_ext ... readme.txt

Posted: 13.01.2021 12:26
by uvviewsoft
thanks! renamed the plugin to 'your name' Extended Selection. updated in addons.
micro issue: the name 'Extended Selection' should be in all places in install.inf.

Posted: 13.01.2021 13:58
by Shovel
Fixed the install.inf