Code Blocks how to hide plus and minus buttons - codeblocks

I'm talking about the - and + buttons that are in a white square box before every { , and when you click them they collapse and expand the code within the {} brackets. I pressed something on my keyboard and they suddenly appeared, I don't remember what though, now I can't find out how to make them disappear, there must be a way?

Related

Normal Mac option-drag block selection in VS Code?

There are already many questions about VS Code's block selection and multi-cursor selection, and I'm not asking how to use it, but rather, how to make it behave in the standard way on a Mac (without the shift ⇧ key pressed).
The way it currently behaves is this: your current cursor location defines one corner of the block selection, and when you press ⇧⌥ and click somewhere else, you define the opposite corner of the block. You can drag as you're clicking, but dragging really only changes the definition of that opposite corner. Your (text) cursor's position always defines one of the block's corners.
Considering that the VS Code default keybinding is ⇧⌥, the behavior is proper for having the shift ⇧ key pressed. But I'm trying to find a way to get the normal behavior that you'd expect on a Mac when the shift ⇧ key is not pressed.
In normal Mac behavior (without shift), the entire block is defined by:
where you first click, before you start dragging, and
where you release, after dragging.
This behavior is exactly the same as for plain-vanilla text selection, except that you get a block, instead of a line-oriented selection.
I would like to find a way to have VS Code allow me to define the block selection solely based on where I click and drag, and not based on the current text cursor location.
How can I do this?
Note that you don't have to drag the mouse. You can single click (with no modifier keys) in one corner, press and hold Shift and Option, and click in the opposite corner, then release the Shift and Option keys. So, your attempt to start the selection is actually extending it (relative to the previous selection).
What's working for me in 1.53.1 (January 2021 release) is to click and hold the mouse button (with no keys pressed; this starts a normal, non-column selection), then press and hold Shift and Option, then continue dragging the mouse. I find this method cumbersome and prefer selecting opposite corners as above.
I don't see an obvious way to change to Option-only to start a column selection.

Xcode Editor text selection issue

If I want to delete few lines of text in most of text editors, not touching some words on the bottom line and the whole upper line, I put cursor on the bottom row leaving all unnecessary words to the left of the cursor. Then I select few lines vertically by holding Shift + ↑. I stop on upper row and get some selection: part below + right part of the upper row:
In this example I want to get rid of if word and an empty space between the function header and the code, not touching the function header (even hough let will stick to the opening bracket {).
Normally (not in Xcode) I would still hold Shift and will press cmd + ➝ to deselect the right (selected) part or the top row.
Result will be like this:
I can simply press Delete and job is done.
However, in Xcode such shortcut usage makes bottom row fully selected (till the right) and not changes upper row selection:
Same thing happens if you select from top to bottom and you need to remove extra selection from the bottom line.
I tried to rebind shortcuts in Preferences but didn't find a solution.
This example is very particular and maybe not the best, however I face such selection problems only in Xcode and have to use mouse which is not handy.
This is a rather old question, but what you want is fairly simple to achieve. If your cursor is between the if and the let, you would only need to press option-shift-left arrow twice. The first time, it would select the if and the leading tabs, and the second would select the empty line.

How do I shift a set of lines one space to the right within a text editor?

How do I shift a set of lines one space to the right within a text editor?
If I wanted to shift a set of lines several spaces to the right, I would perform:
selected text + Tab
However, I just want to shift the text one space to the right without tabbing.
Any suggestions?
Hold down the alt key, left-click and hold the mouse button down on the first line where you wish to insert your space. Then, while still holding down the left mouse button, drag the mouse vertically to extend this edit point to all the lines you want to move. Dragging it horizontally will create a box selection, which you want to avoid, as the selected text will end up being replaced, rather than a space be added.
Also, you cannot select individual, disjoint lines to move. You can only use alt-drag over a contiguous block of lines.
Once you have your multiline edit point created, hit the spacebar once.
Tada.
Here's a blog post by Scott Guthrie with more details and a vidya demo
If you don't want to use the mouse, you can use shift+alt+(up, down, left, or right) to create a box selection, or a multiline edit point.

Visual Studio 2013 - Replace All Button gone (not just off screen)

I am unable to perform multi-file text search and replace (in Visual Studio).
In the past, when I opened the "Replace in Files" dialog, there were 4 buttons in the lower right. One of the bottom two buttons allowed me to "Replace All".
The two lower buttons (including "Replace All") are no longer present.
I believe this occurred after I changed some Windows settings so that I could use menus without the Magnifier.
It is not just a matter of the buttons being off-screen because the window is too large (although it is too large - they would be off-screen, if they were present).
I can drag the window and see the bottom, even though the top is then off-screen (I use AltWindowDrag, allowing me to hold the ALT key, and drag by any part of the window, not just the title bar).
The two lower buttons are not present. I'm unable to resize the window - when I try, nothing happens, or the window repositions so that I can see the title bar, but can no longer see the bottom.
The two buttons that are still present (Find Next and Replace) don't have keyboard shortcuts, so I presume that Replace All doesn't either. Nor can I select either of those two buttons using Tab, so probably can't select an "invisible" "Replace All" button that way.
Any help appreciated.
You can use Find and Replace by pressing Ctrl+H and to Replace All just use Alt+A.

slow down scrolling adjustment when selecting a long line

I have a long line that I want to select a section in the middle. In Visual Studio, it would scroll all the way to the end of the line, passing where I want the selection to end, when I move pass the text area and move all the way back when I try to move back a little. Is there a way to slow down the Visual Studio scrolling adjustment?
If you are talking about selecting text using the mouse you can get fine grained control by combining the the mouse and keyboard. This should work in any application that allows text selection, not just Visual Studio.
First click the location where you want to begin selecting text.
Next scroll to the location where you want to end selecting text and hold down Shift on the keyboard while clicking with the mouse. The block of text between the first click and the shift+click will be selected without having to worry about the selection jumping around due to scrolling.
As for actually slowing down the scrolling; I know of no way to do that. Hopefully my tip should give you an alternate way to do what you actually want.

Resources