How do I turn off "column box select" in visual studio code? - visual-studio

I seem to be unable to turn off box/column select. In other words, if I try to select across multiple lines, I only get a box select, as opposed to the usual behavior where entire lines are selected as I add lines.
I am using version 1.48.2 on a mac.
I must have pressed option+shift or some other such code inadvertently and now I can only select boxes. I have looked at my keyboard shortcuts but I don't know what to look for...
Unfortunately searching for solutions via google or SE only produces results for how to turn it on, not off! I don't know what the opposite mode is. "line select" seems to be just to select the current line, not for entire lines across multiline selections.
example of current behavior. I want the entire line "spaceship..." to be selected.

Just found the answer myself looking for something else. There is a "Text Editor" setting called "Editor: Column Selection" that controls this. The default is off, but I must have turned it on somehow without realizing it. Thanks to anyone who may have taken time to read this....

Cmd+8 is the shortcut to toggle the setting

Related

DataGrip current statement highlighting

I installed DataGrip and spent a couple hours getting rid of bells and whistles that distract me from editing sql, like the lightbulb. I'm down to this one that for my life I can't figure, so when I move around with the caret, the editor comes up with what it thinks is the current statement and draws a thin border around it, say if it's a line ending in a semicolon, it will border just that line, but if I have several statements each not ending in semicolon, it will think they all make up a single one and draw the rectangle around the whole thing. This in itself is distracting, plus if I hit Enter within the border, it will indent differently according to what it thinks the whole thing is. I just want Enter to go to a new line at the 0, leftmost position.
Is there any way to turn the whole feature off completely?
Apart from that, does anyone know if it's possible to get DataGrip to display the number of rows affected after an INSERT or UPDATE, like most other tools do?
I'm using it with Postgresql. Thank you in advance!
cpp_developer! (By the way, what do you think about CLion? :)
There are several questions in one, let's get answers one by one.
Lightbulb: there is no UI for getting rid of it, but there is the way. It is described in this ticket: https://youtrack.jetbrains.com/issue/IDEA-94381
TLDR:
Following line should be added to the
$IDE_CONFIG_HOME/options/editor.xml then:
<option name="SHOW_INTENTION_BULB" value="false" />
Line showing the current statement.
It can be removed, like any other color/font thing: A small helpful action. For now it is only present in the Find Action menu (Ctrl/Cmd+Shift+A), but as usual, you can assign any shortcut to it.
This action will navigate you to the settings which are relevant to the context under the caret. If there are several of them, just choose one. In your case "Statement to execute". Then remove it or make white.
Smart indenting. Just turn this off:
Number of INSERTed and UPDATEd rows can be found in Output tab. But please, run them in batch mode -> context menu "Run %your_console%.sql"

How can I block select multiple lines of code in VS 2012?

My question today is, when selecting multiple lines of code and not completely selecting the full line for all the lines selected, how can I (or is there any keyboard shortcut for) block select all the lines that I have already selected, so that I have not just some lines fully selected and some not fully selected, but all the lines are fully selected from the home of the top line selected, to the end of the last line selected?
Note: The bold text in the segment above is what I am mainly trying to ask.
Thanks to anybody that is able to provide me with any helpful information!
From your question it looks like you want to select a block and not the complete line.
Hold the alt key and use the mouse to select your block.
You can use Alt + Shift + Arrow keys..
Its called Box Selection and was introduced in VS2010.
learn more about it here

Controlling keyboard content shift behaviour

I have following content layout on a page:
Then text is entered into input box, keyboard appears and 1. Fixed header is shited up:
How can I make area 1. Fixed header really fixed, so it's not moved by keyboard?
Update 1: solution #1, however I find it rather cumbersome and complex to implement. If there any other ways I will be happy to see them.
Kindly go through this example we have to do some manual works as this issue is because of the default property of keyboard in wp7
http://sorokoletov.com/2011/08/windows-phone-70-handling-text-entry-screens/

Alt + Enter doesn't use appropriate quick fix in Resharper

I worked with Resharper 5 before and when I have a problem in code (for example unsuitable space around a parentheses), I used Alt+Enter and Resharper fixed the problem. But in V6, this doesn't fix the problem, it generate a supress statement! What should I do?
Here is more detail:
1- I have this line in my code:
if (this.RequestClose!= null)
Resharper draw a blue line under it and warn that the space around != is not correct.
In Resharper 5, I could press Alt+Entyer two times to fix the spacing problem. In Resharper 6, if I press Alt + Enter two times on this line, nothing happens.
2- I have this line in my code:
var view = new AddressDetailView();
view.DataContext = viewModel;
Resharper suggests using object initializer, but pressing Alt+Enter twice doesn't fix it.
Resharper 6.1 solved this problem!
Did you actually look at the menu item you're selecting? (I'm guessing not, since your question includes no mention of what's in the menu.) Alt+Enter brings up a pop-up menu, you know. By pressing Alt+Enter twice, you're just selecting the first item in that menu.
ReSharper 6 has new features, therefore it has more options in the list, therefore the order is sometimes different. The quick fixes are almost certainly still working; it's just that the first quick-fix in the list isn't always the same one as in R#5.
The solution is simple: read what's on the screen before you select it. If the quick-fix you want isn't the first in the list, then cursor to the one you want before you hit Enter.
(There's never been a ReSharper version where it's safe to always accept the first item in the menu -- the options change depending on whether R#'s background scanning has completed yet or not. If you've been blindly accepting the first item every time, I'm surprised you haven't gotten bitten before now.)
I could not find any way to fix this problem and decided to use R# 5.1 with Style cope instead.

How can I find and replace inside a selection in Xcode?

In Xcode < 4, you could hold the "option" key, and the "Replace All" button would change to "Replace in Selection". As of Xcode 4, this does nothing. Anyone know if there's a new way to do it, or is it bug filing time?
This appears to be working again now, at least in Xcode 4.4.1.
When the find/replace bar appears at the top of the editor, holding down the option key on the keyboard causes "Replace in Selection" to appear in lieu of "Replace All."
I'm glad, because this was an ANNOYING omission.
Another workaround:
In Xcode, select the text, press copy
In a terminal session:
pbpaste|sed 's/SOURCETEXT/NEWTEXT/g'|pbcopy
Return to Xcode window, press paste
Since the original should still be selected, it will just be replaced. You could probably build a simple shell script to do this.
Doug
An few images to supplement the chosen answer:
And holding down Option:
See also
Find/Replace in Xcode using Regular Expressions
Seems like missing functionality. You should file a bug report.
I'm upset that they took out this functionality, as I used it constantly, but here's my workaround. Copy your selected text from Xcode4 to TextEdit or some other word processor, do the find and replace there, and then copy the results back into Xcode.
It's not sexy but it's worth it if you do a lot of these "find and replace on my selection", and you leave the word processor open in Spaces as you work.
They should add "my selection" as an alternative to "workspace" and "my scope".
There is another way only replace the matches you find, rather than just this one or all of them.
I suggest you save a copy first, just in case....
In Find and Replace, Show Find Options (you can do this by pressing the magnifying glass).
Press Preview.
Uncheck all the ones you don't want replacing.
Press Replace
Hope that helps, it did me.
Not ideal, but not too bad:
Do a find and replace in workspace (cmd-opt-shift-f) enter your desired find/replace
Enter your desired search term and hit return
Select the range of replacements from the list of matches on the left
Hit replace (not replace all)
To replace text in a selection using Xcode 9
Press Option-Command-F to bring up the find/replace box.
Enter the search and replace string. Changing the search string will lose any existing selection, so..
Make your selection (again). (If you don't do this, the selection will be the first search string found only)
Hold down the key and "Replace All" will change to "Replace Selection", then click it.
Once you understand that you make your selection AFTER you have entered the search string, then this is not that clumbersome and works fine.
I find alt-command-f easier for local find and replace (4.3) and then working around your selection.
EthenA.Wilson asked in a comment to the OP a couple of days ago:
"Is there a way to do this in Xcode 5?"
For the benefit of those who, like me, had been searching for it, here's how:
After you put your Find and Replace terms in the bars at the top left-hand side of the editor page, select the text you want to search in, then look at the top right-hand side (same bar). You'll see where it says "All", right next to "Replace." Now press the Option key. "All" will change to "All in Selection." Click it, and you're done. Could be a bit more intuitive, but the functionality is there in Xcode 5.
Naturally, good idea to take a snapshot before you click!
HTH!
Not sure which feature prior to Xcode 4 you're referring to, but the shortcut Command+Shift+E gives you "Use Selection for Replace". If you're talking about "Find and Replace in Workspace" (Command+Option+Shift+F), then what you need to do is run your find and then hold down "Shift" or "Command" on the selections shown and then hit "Replace".

Resources