plugin Extended Selection
Posted: 18.11.2020 14:50
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:
* normal double-click will yield selection:* addon's shift+double-click:
(period and adjacent text is added to selection because '.' is in the "include_chars" for this lexer)
* addon's shift+triple-click: (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)
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
Code: Select all
bb.cc
* addon's shift+triple-click:
Code: Select all
bb.cc<dd>(ee=ff)
-----------------------------
Commands in "Plugins / Extended Selection" menu:
- "Toggle Selection"
Cycle through addon's double/triple-click selections.
-----------------------------
Author: Shovel (CudaText forum user)