• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..09-Oct-2021-

src/H09-Oct-2021-1,4781,256

AUTHORSH A D16-Jul-201742 21

COPYINGH A D16-Jul-201717.6 KiB341281

ChangeLogH A D16-Jul-20172 KiB6745

Makefile.amH A D16-Jul-201783 53

Makefile.inH A D29-Sep-202126.9 KiB865779

NEWSH A D16-Jul-201716 21

READMEH A D16-Jul-20174.3 KiB11685

README

1Extra Selection Plugin
2======================
3
4About
5-----
6The Extra Selection plugin adds the following functions to Geany:
7
8Goto matching brace and select (Select to Matching Brace).
9
10Goto line and select (Select to Line).
11
12Toggle the current selection type between stream and rectangular
13(without changing column mode, can be invoked while drag-selecting).
14
15Ctrl-Shift-Alt-Left/Right/Home/End keys - same as Ctrl-Shift, but for
16rectangular selection.
17
18Column mode - while active, all (Ctrl)-Shift-movement keys do rectangle
19selection instead of stream.
20
21Selection with anchor instead of the Shift-movement keys.
22
23--
24
25"Movement keys" refers to the arrows, Home, End, Page Up and Page Down.
26
27For more information, see the Usage section below.
28
29
30Requirements
31------------
32Geany 0.19 or later and the respective headers and development libraries.
33
34
35Installation
36------------
37This plugin is part of the geany-plugins project.
38See the README file of that package.
39
40
41Usage
42-----
43Under Tools -> Extra Selection, there are 7 new items: "Column Mode",
44"Select to Line", "Select to Matching Brace", "Toggle Rectangular/Stream",
45"Set Anchor", "Select to Anchor" and "Rectangle Select to Anchor".
46Normally these should be bound to keys, for example Alt-C, Alt-Shift-L,
47Ctrl-Shift-B, Ctrl+2, F12, Shift-F12 and Alt-Shift-F12. Now:
48
491. Position the cursor on an opening brace and invoke "Select to Matching
50   Brace". The cursor will move to the closing brace, and the braced area
51   will be selected.
52
532. Position the cursor on line 10, invoke "Select to Line" and enter 15.
54   The cursor will move to line 15, and the area between the previous and
55   the current cursor position will be selected.
56
573. Select a small rectangular area and press Control-Alt-Shift-Right. The
58   cursor will move to the next word, extending the rectangurar selection.
59   The complete new keys list is:
60
61   Control-Alt-Shift	Extends the selection to
62   -----------------	------------------------
63   Left                 Previous word
64   Right                Next word
65   Up                   Previous paragraph
66   Down                 Next paragraph
67   Home                 Start of file
68   End                  End of file
69
70   Unfortunately, holding Alt for rectangular selection has some problems,
71   which apply both to the standard Geany keys and these added by the
72   plugin. Under Windows, the Alt-keypad keys generate unicodes, even if
73   used with Shift or Control. With X11, some Alt-(Ctrl)-(Shift)-movement
74   keys may be used by the window manager for moving windows, switching to
75   the previous/next desktop etc. So then:
76
774. Turn "Column Mode" on. While active, the (Control)-Shift-movement keys
78   will select a rectangle instead of stream, without the need to hold
79   Alt (in fact, the (Control)-Alt-Shift-movement keys will be temporarily
80   blocked). This way, you will avoid the Alt key problems mentioned
81   above, and it's more convenient to select while holding Shift only.
82
835. Finally, invoke "Set Anchor", navigate to another point in the document
84   and invoke "Select to Anchor" - the result is obvious. Note that the
85   anchor position is set exactly where the insertion cursor is, not on
86   the character right of the cursor (or on the overtype cursor). When the
87   column mode is active, "Rectangle Selection to Anchor" is disabled, and
88   "Select to Anchor" does rectangular selection.
89
90
91Known issues
92------------
93Rectangular selection of more than a few thousand lines is slow, so you
94may prefer to use stream selection and convert it to rectangular. However,
95if the cursor is on a large line number, such conversion may cause a
96noticable delay. Both issues are scintilla related and can not be fixed by
97this plugin.
98
99If you set the anchor beyond a line end (in the "virtual space"), and edit
100the text before it, the anchor will be moved to the line end. Tracking a
101virtual (after EOLN) cursor position is impossible in scintilla.
102
103
104License
105-------
106Extra Selection is distributed under the terms of the GNU General Public
107License as published by the Free Software Foundation; either version 2 of
108the License, or (at your option) any later version. A copy of this license
109can be found in the file COPYING included with the source code of this
110program.
111
112
113Ideas, questions, patches and bug reports
114-----------------------------------------
115Dimitar Zhekov <dimitar.zhekov@gmail.com>
116