IDE Window: EditorMouseOptionsAdvanced: what changed
Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.
| Old | New | Line | |
|---|---|---|---|
| 1 | - | ||
| 2 | - | ||
| 3 | - | ||
| 4 | - | ||
| 5 | - | ||
| 1 | + | - This page is part of [[IDE Window: Editor Options]] | |
| 6 | 2 | ||
| 7 | - | ||
| 8 | - | ||
| 3 | + | - You can get this dialog via: | |
| 9 | 4 | ||
| 10 | 5 | ||
| 11 | - | ||
| 12 | - | ||
| 6 | + | ||
| 7 | + | Menu / Environment / Editor options / Mouse | |
| 13 | 8 | ||
| 14 | - | ||
| 15 | - | ||
| 16 | - | ||
| 17 | - | ||
| 18 | - | ||
| 19 | - | ||
| 20 | - | ||
| 21 | - | ||
| 22 | - | ||
| 23 | - | ||
| 24 | - | ||
| 25 | - | ||
| 26 | - | ||
| 27 | - | ||
| 28 | - | ||
| 29 | - | ||
| 30 | - | ||
| 31 | - | ||
| 32 | - | ||
| 33 | - | ||
| 34 | - | ||
| 35 | - | ||
| 36 | - | ||
| 37 | - | ||
| 38 | - | ||
| 39 | - | ||
| 40 | - | ||
| 41 | - | ||
| 42 | - | ||
| 43 | - | ||
| 44 | - | ||
| 45 | - | ||
| 46 | - | ||
| 47 | - | ||
| 48 | - | ||
| 49 | - | ||
| 50 | - | ||
| 51 | - | ||
| 9 | + | Source editor / popup menu / Editor properties ... | |
| 52 | 10 | ||
| 53 | 11 | # The Context Tree | |
| 54 | 12 | ||
| 55 | - | ||
| 13 | + | The context tree is the Treeview just left to the Overview Grid. It currently has the entries: | |
| 56 | 14 | ||
| 57 | - | ||
| 58 | - | ||
| 59 | - | ||
| 60 | - | ||
| 61 | - | ||
| 62 | - | ||
| 63 | - | ||
| 15 | + | - **Text** | |
| 16 | + | - **Selection** | |
| 17 | + | - **Gutter** | |
| 18 | + | - **Fold** **Tree** | |
| 19 | + | - **Collapsed** **\[+\]** | |
| 20 | + | - **Expanded** **\[-\]** | |
| 21 | + | - **Line** **Numbers** | |
| 64 | 22 | ||
| 65 | - | ||
| 23 | + | You can define the behaviour of the Mouse-Buttons, dependent on the Context. E.g. clicking "selected text" may have a different action, than clicking unselected text. | |
| 66 | 24 | ||
| 67 | - | ||
| 25 | + | If a click has no Entry in a specific context, it will use the content's parent(s) as fallback. E.g. If you click on "selected text", the configuration of the **Selection** node is searched first. If it has no action for your click, the parent node **Text** is searched. (By default this is used to assign "drag selected text" to the left button) | |
| 68 | 26 | ||
| 69 | - | ||
| 27 | + | The **Gutter** and **Text** node are top level nodes, that do not have fall-backs. But the other nodes do fall back on their parents. | |
| 70 | 28 | ||
| 71 | - | ||
| 29 | + | See also The Priority and Fall-Through in the The Action / Behaviour section. | |
| 72 | 30 | ||
| 73 | 31 | # The Click Configuration | |
| 74 | 32 | ||
| 75 | - | ||
| 33 | + | When you click a mouse button, the following items are checked to find the desired behaviour/action. | |
| 76 | 34 | ||
| 77 | 35 | ## The Button | |
| 78 | 36 | ||
| 79 | - | ||
| 37 | + | There are individual settings for the **Left**, **Right** and **Middle** mouse Button | |
| 80 | 38 | ||
| 81 | - | ||
| 39 | + | - Extra Mouse Buttons (Button 4 and 5) work only on Windows | |
| 82 | 40 | ||
| 83 | - | ||
| 41 | + | == | |
| 84 | 42 | ||
| 85 | - | ||
| 43 | + | The Click Type == | |
| 86 | 44 | ||
| 87 | - | ||
| 45 | + | There are individual settings for **Single**, **Double**, **Triple** or **Quad** clicks. | |
| 88 | 46 | ||
| 89 | 47 | Please make sure you read the section on Double to Quad Clicks | |
| 90 | 48 | ||
| 91 | - | ||
| 49 | + | There also is a setting **Any**, which means the action is executed for any of the clicks. That would mean that a double click would execute the action twice. Or if the first part of the double-click changed the state of the object, the 2nd part would apply to the new state. | |
| 92 | 50 | ||
| 93 | - | ||
| 51 | + | - Example: | |
| 94 | 52 | ||
| 95 | - | ||
| 96 | - | ||
| 53 | + | ||
| 54 | + | The left button on the code fold part is configured as **Any**. Each click will toggle between folded and unfolded. Therefore a double click will revert the action of the first. | |
| 97 | 55 | ||
| 98 | - | ||
| 56 | + | Without the **Any** setting, if you accidentally folded the wrong node, you would have to wait before you could click again to unfold it. (Because a quick 2nd click would count as double click, which wouldn't be matched by **Single**) | |
| 99 | 57 | ||
| 100 | - | ||
| 101 | - | ||
| 58 | + | Notes: | |
| 102 | 59 | ||
| 103 | - | ||
| 60 | + | - Not all of them are supported on all platforms | |
| 61 | + | - On Windows **Triple** and **Quad** only work for the left button. | |
| 104 | 62 | ||
| 105 | - | ||
| 63 | + | == | |
| 106 | 64 | ||
| 107 | - | ||
| 65 | + | The Click Direction == | |
| 108 | 66 | ||
| 109 | - | ||
| 67 | + | A mouse click consists of a mouse-**down** and a mouse-**up**. | |
| 110 | 68 | ||
| 111 | - | ||
| 69 | + | Actions can be configured to happen on either of those 2 events. | |
| 112 | 70 | ||
| 113 | - | ||
| 71 | + | You can assign 2 different actions to the 2 events of the same click. They will be executed in the order of the events. However keep in mind that such a configuration may limit the action of the mouse-**down** event. | |
| 114 | 72 | ||
| 115 | - | ||
| 116 | - | ||
| 117 | - | ||
| 118 | - | ||
| 119 | - | ||
| 73 | + | Notes: | |
| 120 | 74 | ||
| 121 | - | ||
| 75 | + | - Some events require the correct Click Direction to work properly: | |
| 76 | + | - Context-Menu: On some WidgetSets this will only work reliable on mouse-**up** events | |
| 77 | + | - Start Selection, Drag Selection: Only works on **down** events, since it relies on the following mouse-movement-while-button-down. (It has a build in "end" at mouse button up) | |
| 78 | + | - Selecting and Dragging (only if actually done by moving the mouse) capture the mouse-up event and prevent any other Action on the up event.\ | |
| 79 | + | This can be used to select/drag if mouse is moved, otherwise fall back to an action configured on mouse up | |
| 122 | 80 | ||
| 123 | - | ||
| 81 | + | == | |
| 124 | 82 | ||
| 125 | - | ||
| 83 | + | Restricting the mouse-up action == | |
| 126 | 84 | ||
| 127 | - | ||
| 85 | + | If an action is set to mouse-up, then it can be restricted to execute only, if the down click was on the same area. | |
| 128 | 86 | ||
| 129 | - | ||
| 87 | + | The following test can be performed: | |
| 130 | 88 | ||
| 131 | - | ||
| 132 | - | ||
| 89 | + | - Match action pos of mouse down: | |
| 133 | 90 | ||
| 134 | - | ||
| 91 | + | ||
| 92 | + | This does check if a click at the mouse-down location would trigger the same action. | |
| 135 | 93 | ||
| 136 | - | ||
| 94 | + | In cases like fold, where the \[+\] on different lines all return the fold-action, yet should be treated as different, this needs to be combined with the "action line". For a click on the current selection of text on the other hand, all lines might be treated the same. | |
| 137 | 95 | ||
| 138 | - | ||
| 96 | + | - Match action line of mouse down: | |
| 139 | 97 | ||
| 140 | - | ||
| 98 | + | ||
| 99 | + | The down click occurred on the same line of text | |
| 141 | 100 | ||
| 142 | - | ||
| 101 | + | - Match action button of mouse down: | |
| 143 | 102 | ||
| 144 | - | ||
| 103 | + | ||
| 104 | + | The down last click was the same button (no other button has been pressed in the meantime) | |
| 145 | 105 | ||
| 146 | - | ||
| 106 | + | - Match action modifiers of mouse down: | |
| 147 | 107 | ||
| 148 | - | ||
| 108 | + | ||
| 109 | + | The down click was done using the same modifier keys | |
| 149 | 110 | ||
| 150 | - | ||
| 111 | + | - Search all action of mouse down: | |
| 151 | 112 | ||
| 152 | - | ||
| 113 | + | ||
| 114 | + | If the click is on an element that overrides the actions for the below "context" #The_Context_Tree, check if the action would have been on any of the outer contexts. | |
| 153 | 115 | ||
| 154 | - | ||
| 116 | + | - Continue with next mouse up action: | |
| 155 | 117 | ||
| 156 | - | ||
| 118 | + | ||
| 119 | + | If the up click is not executed, search default actions and outer context for an alternative action to be executed. The default if this is not given, is to perform no action for this mouse-up. | |
| 157 | 120 | ||
| 158 | - | ||
| 121 | + | == | |
| 159 | 122 | ||
| 160 | - | ||
| 123 | + | The Modifier Keys == | |
| 161 | 124 | ||
| 162 | - | ||
| 163 | - | ||
| 164 | - | ||
| 125 | + | Mouse behaviour can be modified by holding the **Shift**, **Alt** or **Ctrl** key (or combinations of them) | |
| 165 | 126 | ||
| 166 | - | ||
| 127 | + | At the time of the click-**down** or **up** the state of all three keys is checked. An action can be defined to: | |
| 167 | 128 | ||
| 168 | - | ||
| 169 | - | ||
| 129 | + | - require one, some or all of the modifier keys pressed (Checkbox ticked) | |
| 130 | + | - require one, some or all of the modifier keys *not* pressed (Checkbox not ticked) | |
| 131 | + | - ignore the state of one, some or all of the modifier keys (Checkbox greyed) | |
| 170 | 132 | ||
| 171 | - | ||
| 172 | - | ||
| 133 | + | For a given combination of Button, Click-Type, Click-Direction there must not be any ambiguity for the modifier keys. Example | |
| 173 | 134 | ||
| 174 | - | ||
| 175 | - | ||
| 176 | - | ||
| 135 | + | Bad / Ambiguous | |
| 177 | 136 | ||
| 178 | - | ||
| 179 | - | ||
| 137 | + | - Left, Single, down Click with: Shift required pressed; Alt and Ctrl ignored | |
| 138 | + | - Left, Single, down Click with: Ctrl required pressed; Alt and Shift ignored | |
| 180 | 139 | ||
| 181 | - | ||
| 140 | + | ||
| 141 | + | Now if you do this click, with both of Shift and Ctrl pressed, it would be unclear which of the 2 settings to use | |
| 182 | 142 | ||
| 183 | - | ||
| 143 | + | Correct | |
| 184 | 144 | ||
| 185 | - | ||
| 145 | + | - Left, Single, down Click with: Shift required pressed; Ctrl required un-pressed; Alt ignored | |
| 146 | + | - Left, Single, down Click with: Ctrl required pressed; Shift required un-pressed; Alt ignored | |
| 186 | 147 | ||
| 187 | - | ||
| 188 | - | ||
| 148 | + | If you whish Shift to be preferred (the shift action should be taken, if both modifier keys are pressed) then you must at an extra setting: | |
| 189 | 149 | ||
| 190 | - | ||
| 150 | + | - Left, Single, down Click with: Ctrl required pressed; Shift required pressed; Alt ignored | |
| 191 | 151 | ||
| 192 | - | ||
| 193 | - | ||
| 152 | + | Default Fallback | |
| 194 | 153 | ||
| 195 | - | ||
| 196 | - | ||
| 197 | - | ||
| 154 | + | There is one exception from this rule. If all modifier keys are set to be ignored, the entry becomes the fall-back for the button, click-type, click-dir configuration. This is, if no configuration is found which has at least one modifier key required either pressed or un-pressed, then the fallback will be used. | |
| 198 | 155 | ||
| 199 | - | ||
| 156 | + | Note | |
| 200 | 157 | ||
| 201 | - | ||
| 158 | + | The Modifier Combinations used to detect the action on mouse down (or up) has nothing to do with the modifier Key, that certain actions use during there mouse-move phase.\ | |
| 159 | + | e.g. Dragging uses "ctrl" to copy the dragged text instead of moving it. However the use of "ctrl" for copy indication is during mouse move, so you can set start dragging to rely on any other Modifier key. It is however recommended to set **Ctrl** to greyed, so you can start dragging with the key pressed or un-pressed.\ | |
| 160 | + | This is different to using "alt" (or others) for column mode selection: Here the decision is made only at the time of click. Later changes of the "alt" key during mouse-move do not change the selection mode. | |
| 202 | 161 | ||
| 203 | - | ||
| 162 | + | == | |
| 204 | 163 | ||
| 205 | - | ||
| 164 | + | The Priority == | |
| 206 | 165 | ||
| 207 | - | ||
| 208 | - | ||
| 166 | + | It is possible to configure several equal (or overlapping / ambiguous) Clicks in the same Context. The Configuration with the highest Priority (lowest number (0 = top)) wins. | |
| 209 | 167 | ||
| 210 | - | ||
| 211 | - | ||
| 168 | + | This can be used for 2 purposes: | |
| 212 | 169 | ||
| 213 | - | ||
| 170 | + | Resolve Ambiguity | |
| 214 | 171 | ||
| 215 | - | ||
| 216 | - | ||
| 172 | + | 1. Left, Single, down Click, **priority** **0** with: Shift, Ctrl required pressed; Alt ignored | |
| 173 | + | 2. Left, Single, down Click, **priority** **1** with: Shift required pressed; Ctrl, Alt ignored | |
| 217 | 174 | ||
| 218 | - | ||
| 175 | + | Normally those two would conflict, because if you click with shift and ctrl then both will match. However due to the priority this can be resolved: | |
| 219 | 176 | ||
| 220 | - | ||
| 221 | - | ||
| 177 | + | - Only Shift pressed: Only Config 2 (priority 1) does match. Config 2 is taken. | |
| 178 | + | - Shift and Ctrl pressed: Both Config do match. Config 1 has higher priority (0), Config 1 is taken | |
| 222 | 179 | ||
| 223 | - | ||
| 180 | + | ; | |
| 224 | 181 | ||
| 225 | - | ||
| 226 | - | ||
| 227 | - | ||
| 182 | + | Define Actions for Command Fall-through: Sometimes a Command can not be executed at the given location. If the Command notices this, it will pass the Click on. The Fall-Through first looks for further Commands in the same Context, but with lower priority. If none are found it will search parent context too. | |
| 228 | 183 | ||
| 229 | - | ||
| 184 | + | - Not all Commands/Actions support Fall-through | |
| 185 | + | - "Default Fallback" (modifier Keys) will act like any other entry in the Priority. If A click is matched by a "specific configuration" at priority 2 (low) and a "default fallback" at priority 1 (higher), then it will first be given to the "default fallback", and only if this supports and trigger Fall-through the event may go to the "specific config" | |
| 186 | + | - See Useful Examples: Extend "Source Links" to jump Begin/End-pairs | |
| 230 | 187 | ||
| 231 | - | ||
| 188 | + | == | |
| 232 | 189 | ||
| 233 | - | ||
| 190 | + | Opt(ion) field == | |
| 234 | 191 | ||
| 235 | - | ||
| 192 | + | This numeric option applies to certain settings only: | |
| 236 | 193 | ||
| 237 | - | ||
| 238 | - | ||
| 194 | + | Wheel scroll: | |
| 239 | 195 | ||
| 240 | - | ||
| 196 | + | - speed lines =\> amount of lines | |
| 197 | + | - other speed =\> percent | |
| 241 | 198 | ||
| 242 | - | ||
| 199 | + | and possibly a few others. | |
| 243 | 200 | ||
| 244 | - | ||
| 201 | + | = | |
| 245 | 202 | ||
| 246 | - | ||
| 203 | + | The Action / Behaviour = | |
| 247 | 204 | ||
| 248 | - | ||
| 249 | - | ||
| 205 | + | Each mouse button event as defined above, can trigger some action. The same action can be assigned to more than one event. (IF 2 events have the same behaviour, then there modifier keys are not checked for ambiguity) | |
| 250 | 206 | ||
| 251 | - | ||
| 252 | - | ||
| 207 | + | Move Caret checkbox | |
| 208 | + | With each action you can define, if you whish the caret to be moved. However this only additionally enforces the caret move. If an action implicitly moves the caret, then this will happen, even if you uncheck the this box. (e.g. Selecting a block always moves the caret) | |
| 253 | 209 | ||
| 254 | - | ||
| 255 | - | ||
| 256 | - | ||
| 210 | + | Command options | |
| 211 | + | Some commands take additional params to refine there behaviour | |
| 212 | + | ||
| 213 | + | Implicit mouse up action | |
| 214 | + | Some events that occur on mouse **down** events implicitly assign a mouse **up** action for the current click.\ | |
| 215 | + | An implicit Mouse-Up event may or may not cancel the action/behaviour normally assigned to the mouse up.\ | |
| 257 | 216 | E.g. dragging implicitly drops (inserts) the text when the button is released, it cancel whatever action may have been assigned to the mouse up event. | |
| 258 | 217 | ||
| 259 | - | ||
| 260 | - | ||
| 218 | + | Fall-Through | |
| 261 | 219 | ||
| 262 | - | ||
| 263 | - | ||
| 220 | + | Some Commands can not always be executed. For Example "Source Link Command" can only be executed, if above a link-able identifier. In cases where a command can not be executed, it may trigger a Fall-Through. This means the Click will behave as if the configuration had not existed, and consequently a lower priority followed by the parent context will be searched.\ | |
| 221 | + | Note: Not all commands support this, even if they are not executed. | |
| 264 | 222 | ||
| 265 | 223 | ## No Action Command | |
| 266 | 224 | ||
| 267 | - | ||
| 225 | + | There are 2 uses for this: | |
| 268 | 226 | ||
| 269 | - | ||
| 270 | - | ||
| 227 | + | Move Caret | |
| 228 | + | With "Move Caret" it will set the caret to the mouse location. This will unset an existing selection. It also prevents a new selection from being marked by moving the mouse.\ | |
| 271 | 229 | If it occurs on **down** then the caret will be set to the location the mouse was pressed, never mind where you release the button | |
| 272 | - | ||
| 273 | - | ||
| 274 | - | ||
| 275 | 230 | ||
| 276 | - | ||
| 231 | + | Prevent fallback to parent node | |
| 232 | + | In Context-Subnodes this can prevent a click from executing the parent node(s) action.\ | |
| 233 | + | E.g. this is assigned to the FoldTree. It catches clicks that are neither on a \[+\] or \[-\] node. Otherwise they fall through to the normal Gutter and toggle a breakpoint. | |
| 277 | 234 | ||
| 278 | - | ||
| 279 | - | ||
| 235 | + | Fall-Through | |
| 236 | + | Never | |
| 280 | 237 | ||
| 281 | 238 | ## Selection Commands | |
| 282 | 239 | ||
| 283 | 240 | ### Block Selection Commands | |
| 284 | 241 | ||
| 285 | - | ||
| 242 | + | There are 3 Selection commands, for the 3 selection modes supported by SynEdit: **Normal**, **Column** or **Full-Lines**. | |
| 286 | 243 | ||
| 287 | - | ||
| 244 | + | Note: All of them move the caret implicitly. | |
| 288 | 245 | ||
| 289 | - | ||
| 246 | + | Each of those can be configured in 2 different *Modes*: | |
| 290 | 247 | ||
| 291 | - | ||
| 292 | - | ||
| 293 | - | ||
| 294 | - | ||
| 295 | - | ||
| 248 | + | Begin | |
| 249 | + | Starts a new selection . If an old selection exists, it will be disregarded. The new Selections starts at the current mouse location. | |
| 296 | 250 | ||
| 297 | - | ||
| 251 | + | Continue | |
| 252 | + | If an old selection exists, then it will be extend.\ | |
| 253 | + | If there was no selection, then a new selection is created, which will start at the position the caret had before the event occurred, and range to the click position. | |
| 298 | 254 | ||
| 299 | - | ||
| 300 | - | ||
| 255 | + | Those events should be assigned to mouse **down** events, in which case the selection will resize with any following mouse-movement until the mouse button is released. (**Implicit mouse up action**) | |
| 301 | 256 | ||
| 302 | - | ||
| 257 | + | "Begin-Mode" on mouse **up** does nothing, but setting the caret. (Except currently for line mode, which selects the line).\ | |
| 258 | + | "Continue-Mode" on mouse **up** will extend the selection | |
| 303 | 259 | ||
| 304 | - | ||
| 305 | - | ||
| 260 | + | Fall-Through | |
| 261 | + | Never | |
| 306 | 262 | ||
| 307 | 263 | ### Item Selection Commands | |
| 308 | 264 | ||
| 309 | - | ||
| 310 | - | ||
| 311 | - | ||
| 265 | + | Allow to select the Word, Line or Paragraph at the mouse position. Once selected the selection will not extend, if the mouse moves. | |
| 312 | 266 | ||
| 313 | - | ||
| 267 | + | "Line" supports 2 modes, either including leading/trailing spaces of the line or not. | |
| 314 | 268 | ||
| 315 | - | ||
| 269 | + | Note: All of them move the caret implicitly. | |
| 316 | 270 | ||
| 317 | - | ||
| 318 | - | ||
| 271 | + | Fall-Through | |
| 272 | + | Never | |
| 319 | 273 | ||
| 320 | 274 | ### Drag Selection Command | |
| 321 | 275 | ||
| 322 | - | ||
| 323 | - | ||
| 324 | - | ||
| 276 | + | Drags (Copies or moves) the current selection to a new position, following mouse movement. It will be pasted there if the button is released. (**Implicit mouse up action**) | |
| 325 | 277 | ||
| 326 | - | ||
| 278 | + | Independent of the modifier keys pressed at the time of the event occurring (or the configured mod, keys), it will check for the **ctrl** key at the time the dragged text is inserted. If Ctrl is pressed the text will be copied, otherwise moved. | |
| 327 | 279 | ||
| 328 | - | ||
| 280 | + | Note: moves the caret implicitly. | |
| 329 | 281 | ||
| 330 | - | ||
| 331 | - | ||
| 282 | + | Fall-Through | |
| 283 | + | If no text is selected. Or if the selection can not be dragged (Column or Line mode selection) | |
| 332 | 284 | ||
| 333 | 285 | ### Quick copy Selection Command | |
| 334 | 286 | ||
| 335 | - | ||
| 336 | - | ||
| 337 | - | ||
| 287 | + | Inserts a copy of the currently selected text at the mouse location. If no text is selected, inserts the content of the clipboard. | |
| 338 | 288 | ||
| 339 | - | ||
| 289 | + | Note: moves the caret implicitly. | |
| 340 | 290 | ||
| 341 | - | ||
| 342 | - | ||
| 291 | + | Fall-Through | |
| 292 | + | If no text is selected and the clipboard is empty | |
| 343 | 293 | ||
| 344 | 294 | ## Context Popup Menu | |
| 345 | 295 | ||
| 346 | - | ||
| 347 | - | ||
| 348 | - | ||
| 296 | + | Note: GTK2: PopUp-Menu is recommended for use with ButtonUp only | |
| 349 | 297 | ||
| 350 | - | ||
| 351 | - | ||
| 298 | + | Fall-Through | |
| 299 | + | Never | |
| 352 | 300 | ||
| 353 | 301 | ## Fold Commands | |
| 354 | 302 | ||
| 355 | - | ||
| 303 | + | Fold commands are commonly assigned to the fold-tree-nodes, but can also be assigned to other context, like the text area. | |
| 356 | 304 | ||
| 357 | - | ||
| 305 | + | The fold-tree has 3 context-nodes | |
| 358 | 306 | ||
| 359 | - | ||
| 360 | - | ||
| 307 | + | Fold Tree | |
| 308 | + | Any area of the fold-tree, this can be \[+\], \[-\], \|, or empty | |
| 361 | 309 | ||
| 362 | - | ||
| 363 | - | ||
| 364 | - | ||
| 365 | - | ||
| 310 | + | Collapsed | |
| 311 | + | The \[+\] only. This means the line has at least one collapsed section. It may have a mix of collapsed/expanded sections | |
| 366 | 312 | ||
| 367 | - | ||
| 313 | + | Expanded | |
| 314 | + | The \[-\] only. This means the line has at at only expanded sections (at least one) | |
| 368 | 315 | ||
| 316 | + | Note, that if you configure a specific click (e.g. shift-left-down) for either \[+\] or \[-\] or both, then most likely you should add the same click with "no action" (or other default) to the parent "Fold Tree" node. Otherwise such a click if not on the \[+\]/\[-\] node will fall through to the gutter, and may trigger an action there. | |
| 317 | + | ||
| 369 | 318 | ### Fold Commands | |
| 370 | 319 | ||
| 371 | - | ||
| 320 | + | By default only acts on nodes starting on the line at the mouse location. | |
| 372 | 321 | ||
| 373 | - | ||
| 322 | + | The following modes are available: | |
| 374 | 323 | ||
| 375 | - | ||
| 376 | - | ||
| 377 | - | ||
| 378 | - | ||
| 379 | - | ||
| 380 | - | ||
| 381 | - | ||
| 382 | - | ||
| 383 | - | ||
| 384 | - | ||
| 324 | + | One | |
| 325 | + | Folds the "most inner" unfolded node starting on this line. This is the node that starts at the right most place in the line. Any node already folded is ignored, so if any unfolded node exists, one and exactly one node will be folded.\ | |
| 326 | + | This is not necessarily the shortest fold-node (in amount of lines folded), as \$region and begin folds can overlap. | |
| 385 | 327 | ||
| 386 | - | ||
| 328 | + | All | |
| 329 | + | Folds all Nodes that start on this line | |
| 387 | 330 | ||
| 388 | - | ||
| 389 | - | ||
| 331 | + | At Caret | |
| 332 | + | This only works if configured for the "Text" context. It folds the node which starts under the current mouse location. This allows you to click on a "begin" (or other keyword) to fold it. (Useful if more than one node starts at the line). | |
| 390 | 333 | ||
| 334 | + | Current | |
| 335 | + | Folds the most inner node containing the current mouse location (the gutter is treated as "at the start of line"). It will search for the first fold-starting keyword (e.g "begin") in front of the current mouse location, whic has a block enclosing the mouse location (end is past mouse location). This may be above the current line.\ | |
| 336 | + | If assigned to the gutter (or fold tree) this is always above the current line, unless the line starts with a keyword (no spaces before) | |
| 337 | + | ||
| 338 | + | Fall-Through | |
| 339 | + | (subject to change) Only in "At Caret" mode, if no fold starts under the mouse location | |
| 340 | + | ||
| 391 | 341 | ### Unfold Commands | |
| 392 | 342 | ||
| 393 | - | ||
| 343 | + | Only acts on nodes starting on the line at the mouse location. | |
| 394 | 344 | ||
| 395 | - | ||
| 345 | + | The following modes are available: | |
| 396 | 346 | ||
| 397 | - | ||
| 398 | - | ||
| 399 | - | ||
| 400 | - | ||
| 347 | + | One | |
| 348 | + | Folds the "most outer" folded node starting on this line. This is the node that starts at the left most place in the line. | |
| 401 | 349 | ||
| 402 | - | ||
| 403 | - | ||
| 350 | + | All | |
| 351 | + | Unfolds all nodes that start at the current line | |
| 404 | 352 | ||
| 405 | - | ||
| 353 | + | Fall-Through | |
| 354 | + | Never (subject to change) | |
| 406 | 355 | ||
| 407 | - | ||
| 356 | + | ### Fold Popup Menu | |
| 408 | 357 | ||
| 409 | - | ||
| 358 | + | Note: GTK2: PopUp-Menu is recommended for use with ButtonUp only | |
| 410 | 359 | ||
| 411 | - | ||
| 360 | + | A pop up menu allowing you to see and change folds enclosing the current line | |
| 412 | 361 | ||
| 413 | - | ||
| 414 | - | ||
| 362 | + | Fall-Through | |
| 363 | + | Never | |
| 415 | 364 | ||
| 416 | 365 | ## Source Link Command | |
| 417 | 366 | ||
| 418 | - | ||
| 419 | - | ||
| 420 | - | ||
| 367 | + | Trigger jump to implementation. | |
| 421 | 368 | ||
| 422 | - | ||
| 369 | + | The "underline" argument controls, if the curremt link under the mouse is highlighted (by an underline) while the modifier keys are pressed. | |
| 423 | 370 | ||
| 424 | - | ||
| 371 | + | If you assign this command to a click with no modifier keys needed, you would get constant highlights (because the expected modifiers (none) are pressed). In this case you cn switch it off. | |
| 425 | 372 | ||
| 426 | - | ||
| 427 | - | ||
| 373 | + | Fall-Through | |
| 374 | + | If no linkable identifier is below the mouse | |
| 428 | 375 | ||
| 429 | 376 | ## Breakpoint Command | |
| 430 | 377 | ||
| 431 | - | ||
| 432 | - | ||
| 433 | - | ||
| 378 | + | Toggle breakpoint on this line | |
| 434 | 379 | ||
| 435 | - | ||
| 436 | - | ||
| 380 | + | Fall-Through | |
| 381 | + | Never | |
| 437 | 382 | ||
| 438 | 383 | ## IDE-Command | |
| 439 | 384 | ||
| 440 | - | ||
| 441 | - | ||
| 442 | - | ||
| 443 | - | ||
| 444 | - | ||
| 385 | + | Select from the same commands that are available via the Keyboard Config. | |
| 445 | 386 | ||
| 446 | - | ||
| 447 | - | ||
| 387 | + | If the chosen Command depends on the current caret location, then it is recommended to tick "Move Caret". | |
| 448 | 388 | ||
| 449 | - | ||
| 389 | + | Fall-Through | |
| 390 | + | Never | |
| 450 | 391 | ||
| 451 | 392 | # The "Other Actions using the same button" Table | |
| 452 | 393 | ||
| 453 | - | ||
| 394 | + | This table can help you identifying other clicks, that may be executed together with the current click. It lists potential other clicks. The listed clicks are not necessarily executed together. | |
| 454 | 395 | ||
| 455 | - | ||
| 396 | + | The list includes clicks from the parent(s) contexts, but not any child contexts. | |
| 456 | 397 | ||
| 457 | - | ||
| 398 | + | The clicks are usually searched in the order indicated in the first column. You need to check: | |
| 458 | 399 | ||
| 459 | - | ||
| 460 | - | ||
| 461 | - | ||
| 462 | - | ||
| 400 | + | - Clicks in the other direction (up/down) | |
| 401 | + | - if the Modifier Keys match or could match | |
| 402 | + | - A click could fall through | |
| 403 | + | - A click with lesser count (single, double, ...) exists | |
| 463 | 404 | ||
| 464 | - | ||
| 405 | + | Usually there are up to two Actions executed. The first matching one from the up and one the first matching one from the down clicks part of the list. Further Actions can happen due to fall through. | |
| 465 | 406 | ||
| 466 | - | ||
| 407 | + | So if your item (highlighted) is not first in the list, or there are actions in the other click-dir (up/down) check carefully, if this matches your intention. | |
| 467 | 408 | ||
| 468 | 409 | # Current Limitations | |
| 469 | 410 | ||
| 470 | - | ||
| 471 | - | ||
| 472 | - | ||
| 473 | - | ||
| 411 | + | - On Windows **Triple** and **Quad** pressing work for the left button only. | |
| 412 | + | - Extra Mouse Buttons (Button 4 and 5) work on Windows and Linux only | |
| 413 | + | - GTK2: PopUp-Menu is recommended for use with Button-Up only | |
| 414 | + | - OS-Depended: Some clicks may be used by the Window-Manager, and do not reach the IDE at all | |
| 474 | 415 | ||
| 475 | 416 | # Pitfalls | |
| 476 | 417 | ||
| 477 | 418 | ## Mixing Down and Up Clicks | |
| 478 | 419 | ||
| 479 | - | ||
| 480 | - | ||
| 420 | + | A mouse-down action does not prevent the mouse up action. This may lead to unexpected additional actions being executed\ | |
| 421 | + | Consequential a click-up may be preceeded by unexpected click-down actions. | |
| 481 | 422 | ||
| 482 | - | ||
| 483 | - | ||
| 423 | + | - The mouse-up / mouse-down can be in a parent context node | |
| 424 | + | - To avoid search in parent nodes, define a "no action" event in the current node | |
| 484 | 425 | ||
| 485 | 426 | ## Double to Quad Clicks | |
| 486 | 427 | ||
| 487 | - | ||
| 428 | + | - On Windows **Triple** and **Quad** only work for the left button. | |
| 488 | 429 | ||
| 489 | - | ||
| 430 | + | If you assign actions to double and triple click, you should aware that they always trigger the lesser clicks too. | |
| 490 | 431 | ||
| 491 | - | ||
| 432 | + | This is: Doing a Triple-Click will first do a Single-Click (down and up) with the same Modifier Keys (none, shift, alt, ...), then a double click, then the triple. (At the time of the first click, SynEdit does not know there will be more clicks) | |
| 492 | 433 | ||
| 493 | - | ||
| 434 | + | - The single click can be in a parent context node | |
| 494 | 435 | ||
| 495 | - | ||
| 496 | - | ||
| 436 | + | You should therefore take care of the actions assigned to those clicks. | |
| 497 | 437 | ||
| 498 | - | ||
| 499 | - | ||
| 500 | - | ||
| 438 | + | - With the default (select, select word, select line, select paragraph) this is no problem. Selecting a Line (Triple) is not disturbed by selecting a Word (Double) first. | |
| 439 | + | - If However you would assign MouseLink to the Single (or Double), and select Word to the Double (or Tripple, one more than the other), this would not work. Because by the time you do your last click, SynEdit already followed the Link (and will not undo this). In fact, if SynEdit followed a Link to an other File, then a new SynEdit became active, and would see your last click as a single click. | |
| 440 | + | - This is not a bug. This is the correct behaviour | |
| 501 | 441 | ||
| 502 | 442 | # Useful Examples | |
| 503 | 443 | ||
| 504 | - | ||
| 444 | + | Some of the examples have become default, since they were listed here | |
| 505 | 445 | ||
| 506 | 446 | ## Mouse "Move" versus "Click" on Gutter to select Lines / toggle action | |
| 507 | 447 | ||
| 508 | - | ||
| 448 | + | Left click followed by mouse move will do selection, while a Click without move will toggle breakpoints/fold-nodes. | |
| 509 | 449 | ||
| 510 | - | ||
| 450 | + | You can also choose to apply this only to the fold part of the gutter. | |
| 511 | 451 | ||
| 512 | - | ||
| 452 | + | Context Node | |
| 453 | + | Gutter | |
| 513 | 454 | ||
| 514 | - | ||
| 515 | - | ||
| 516 | - | ||
| 517 | - | ||
| 518 | - | ||
| 519 | - | ||
| 455 | + | Configuration | |
| 456 | + | Left - Any - Down - All modifiers greyed | |
| 520 | 457 | ||
| 521 | - | ||
| 522 | - | ||
| 458 | + | Action | |
| 459 | + | Selection - Mode: Begin | |
| 523 | 460 | ||
| 524 | - | ||
| 461 | + | Optional: | |
| 525 | 462 | ||
| 526 | - | ||
| 527 | - | ||
| 528 | - | ||
| 529 | - | ||
| 530 | - | ||
| 531 | - | ||
| 463 | + | :;Context Node: Gutter | |
| 532 | 464 | ||
| 533 | - | ||
| 465 | + | :;Configuration: Left - Any - Down - Shift required pressed; Ctrl, Alt required unpressed | |
| 534 | 466 | ||
| 535 | - | ||
| 536 | - | ||
| 537 | - | ||
| 538 | - | ||
| 539 | - | ||
| 540 | - | ||
| 467 | + | :;Action: Selection - Mode: Continue | |
| 541 | 468 | ||
| 542 | - | ||
| 469 | + | Context Node | |
| 470 | + | Gutter | |
| 543 | 471 | ||
| 544 | - | ||
| 545 | - | ||
| 546 | - | ||
| 547 | - | ||
| 472 | + | Configuration | |
| 473 | + | Left - Any - Up - All modifiers greyed | |
| 548 | 474 | ||
| 549 | - | ||
| 550 | - | ||
| 475 | + | Action | |
| 476 | + | Toggle Breakpoint | |
| 551 | 477 | ||
| 552 | - | ||
| 553 | - | ||
| 554 | - | ||
| 555 | - | ||
| 556 | - | ||
| 557 | - | ||
| 478 | + | Context Node | |
| 479 | + | Gutter =\> Line Numbers | |
| 558 | 480 | ||
| 559 | - | ||
| 481 | + | No Entries | |
| 560 | 482 | ||
| 561 | - | ||
| 562 | - | ||
| 483 | + | Remove the Entry | |
| 563 | 484 | ||
| 564 | - | ||
| 565 | - | ||
| 566 | - | ||
| 567 | - | ||
| 568 | - | ||
| 485 | + | Context Node | |
| 486 | + | Gutter | |
| 569 | 487 | ||
| 570 | - | ||
| 488 | + | Configuration | |
| 489 | + | Left - Any - Down - All modifiers greyed | |
| 571 | 490 | ||
| 491 | + | Action | |
| 492 | + | No Action | |
| 493 | + | ||
| 494 | + | If you choose to apply this only to the fold part of the gutter, then instead of removing the above entry set it to "Action: Selection Mode Begin" | |
| 495 | + | ||
| 496 | + | Change | |
| 497 | + | ||
| 498 | + | Context Node | |
| 499 | + | Gutter =\> Fold Tree =\> Collapsed\ | |
| 500 | + | Fold Tree =\> Expanded | |
| 501 | + | ||
| 502 | + | Configuration | |
| 503 | + | Change all to include the checkbox "Act on Mouse Up" | |
| 504 | + | ||
| 572 | 505 | ## Line Numbers in Gutter to select Lines | |
| 573 | 506 | ||
| 574 | - | ||
| 507 | + | You can set the Line number part of the gutter to select text (full lines) instead of toggling a breakpoint. The Rest of the gutter (left to the line numbers) will still do breakpoints. | |
| 575 | 508 | ||
| 576 | - | ||
| 577 | - | ||
| 578 | - | ||
| 579 | - | ||
| 580 | - | ||
| 581 | - | ||
| 509 | + | Context Node | |
| 510 | + | Gutter =\> Line Numbers | |
| 582 | 511 | ||
| 583 | - | ||
| 512 | + | Configuration | |
| 513 | + | Left - Any - Down - All modifiers greyed | |
| 584 | 514 | ||
| 515 | + | Action | |
| 516 | + | Line Selection - Mode: Begin | |
| 517 | + | ||
| 518 | + | Setting Click to "Any" instead of "Single" means that double-clicks do not accidentally toggle breakpoints. | |
| 519 | + | ||
| 585 | 520 | ## Fold by clicking on Keyword ("begin") | |
| 586 | 521 | ||
| 587 | - | ||
| 522 | + | Instead of folding a block by clicking on the \[-\] symbol in the gutter, you can fold a block by clicking on it's start keyword (e.g. "begin" or "\$region"). this is useful if more than one block starts on the same line. | |
| 588 | 523 | ||
| 589 | - | ||
| 590 | - | ||
| 591 | - | ||
| 592 | - | ||
| 593 | - | ||
| 594 | - | ||
| 524 | + | Context Node | |
| 525 | + | Text | |
| 595 | 526 | ||
| 527 | + | Configuration | |
| 528 | + | Middle or Right - Single - Down - Ctrl or Alt | |
| 529 | + | ||
| 530 | + | Action | |
| 531 | + | Fold Code - Nodes: At Caret | |
| 532 | + | ||
| 596 | 533 | ## Fold current block by clicking on vertical fold line | |
| 597 | 534 | ||
| 598 | - | ||
| 535 | + | You can set a click on the vertical line ("\|" below the \[-\] sign in the fold tree) to fold the enclosing node. This may be useful if the \[-\] is outside the visible area. | |
| 599 | 536 | ||
| 600 | - | ||
| 601 | - | ||
| 602 | - | ||
| 603 | - | ||
| 604 | - | ||
| 605 | - | ||
| 537 | + | Context Node | |
| 538 | + | Gutter =\> Fold Tree | |
| 606 | 539 | ||
| 607 | - | ||
| 540 | + | Configuration | |
| 541 | + | Left - Any - Down - All modifiers greyed | |
| 608 | 542 | ||
| 543 | + | Action | |
| 544 | + | Fold Code - Nodes: Current Node | |
| 545 | + | ||
| 546 | + | This replaces the default "No Action" Entry. The default entry (as will the substitute) prevents Fold-Tree-Gutter clicks to toggle breakpoints. | |
| 547 | + | ||
| 609 | 548 | ## Extend "Source Links" to jump Begin/End-pairs | |
| 610 | 549 | ||
| 611 | - | ||
| 550 | + | The Source-Link command is only useful for certain identifiers. But a very similar command exist "Find block other End" (IDE-Command). This can be set as a Fall-Through. In this case the same Click can trigger either of the 2 commands, depending on being above a link, or a begin end pair. | |
| 612 | 551 | ||
| 613 | - | ||
| 552 | + | Since IDE-Commands do not support Fall-Through to a further Action thye must be the last in the order of priorities. The "Source Link Command" does support Fall-Through, so it can be tried first. | |
| 614 | 553 | ||
| 615 | - | ||
| 554 | + | Keep the "Source Link Command" as per default: | |
| 616 | 555 | ||
| 617 | - | ||
| 618 | - | ||
| 619 | - | ||
| 620 | - | ||
| 621 | - | ||
| 622 | - | ||
| 623 | - | ||
| 624 | - | ||
| 556 | + | Context Node | |
| 557 | + | Text | |
| 625 | 558 | ||
| 626 | - | ||
| 559 | + | Configuration | |
| 560 | + | Left - Single - Up - Ctrl required pressed; Shift, Alt required unpressed | |
| 627 | 561 | ||
| 628 | - | ||
| 629 | - | ||
| 630 | - | ||
| 631 | - | ||
| 632 | - | ||
| 633 | - | ||
| 634 | - | ||
| 635 | - | ||
| 562 | + | Priority | |
| 563 | + | 0 (highest) | |
| 636 | 564 | ||
| 637 | - | ||
| 565 | + | Action | |
| 566 | + | Source Link - Underline: yes | |
| 638 | 567 | ||
| 639 | - | ||
| 568 | + | Add a new entry | |
| 640 | 569 | ||
| 641 | - | ||
| 570 | + | Context Node | |
| 571 | + | Text | |
| 642 | 572 | ||
| 643 | - | ||
| 573 | + | Configuration | |
| 574 | + | Left - Single - Up - Ctrl required pressed; Shift, Alt required unpressed | |
| 644 | 575 | ||
| 645 | - | ||
| 576 | + | Priority | |
| 577 | + | 1 (lower) | |
| 646 | 578 | ||
| 647 | - | ||
| 579 | + | Action | |
| 580 | + | IDE-Command - Find block other end | |
| 648 | 581 | ||
| 649 | - | ||
| 650 | - | ||
| 651 | - | ||
| 652 | - | ||
| 653 | - | ||
| 582 | + | Note: While links will be underlined, Begin/End pairs will not be underlined (but can be clicked) | |
| 654 | 583 | ||
| 655 | - | ||
| 584 | + | ## Change History Jumps for 3 button Mouse (follow back the "Source Link" trail) | |
| 656 | 585 | ||
| 657 | - | ||
| 586 | + | This is usually assigned to ctrl-h. Source-Links and similar actions keep a history of points visited. You can navigate this history backward and forward. | |
| 658 | 587 | ||
| 588 | + | By default Lazarus uses the 2 extra Buttons of a 5 button mouse to navigate this jump history. | |
| 589 | + | ||
| 590 | + | (This works only if the mouse is over the text. If you want them to work just anywhere including the Gutter space, you need to add a copy in the Gutter context too. There is currently no context that catches Gutter and Text) | |
| 591 | + | ||
| 592 | + | Steps to change them for a 3 button mouse: | |
| 593 | + | ||
| 594 | + | - select the "text" node from the context-tree (this includes selection, there is no need to add extra config for selection) | |
| 595 | + | - Find the 2 entries (look for "extra1", "Extra2" in the button column | |
| 596 | + | - Double-click each, to edit | |
| 597 | + | - ctrl-right (or ctrl-middle or alt-right) click the "capture" field. **Ensure you check "act on mouse up"** | |
| 598 | + | - save changes | |
| 599 | + | ||
| 600 | + | That's it | |
| 601 | + | ||
| 659 | 602 | ### With a 3 Button Mouse | |
| 660 | 603 | ||
| 661 | - | ||
| 604 | + | You may assign this to something like ctrl-right mouse. | |
| 662 | 605 | ||
| 663 | 606 | **If you use the right button, then you must use it on button-up. Otherwise you will also get the context-menu** | |
| 664 | 607 | ||
| 665 | - | ||
| 666 | - | ||
| 667 | - | ||
| 668 | - | ||
| 669 | - | ||
| 670 | - | ||
| 608 | + | Context Node | |
| 609 | + | Text | |
| 671 | 610 | ||
| 611 | + | Configuration | |
| 612 | + | Right - Single - up - Ctrl Required pressed, Others either greyed, or required un-pressed | |
| 613 | + | ||
| 614 | + | Action | |
| 615 | + | Ide Command - Jump back | |
| 616 | + | ||
| 672 | 617 | ## Move to procedure body | |
| 673 | 618 | ||
| 674 | - | ||
| 619 | + | See this [[http://forum.lazarus.freepascal.org/index.php/topic,12672.msg108498.html|http://forum.lazarus.freepascal.org/index.php/topic,12672.msg108498.html#msg108498 post in the forum]] | |
| 675 | 620 | ||
| 676 | 621 | --- | |
| 677 | - | ||
| 622 | + | *From the Free Pascal wiki, page "IDE Window: EditorMouseOptionsAdvanced", as it stood on 2015-07-02 after a change by FTurtle, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* |
