How to jump words in text editor - visual-studio

I used to be able to hold down the Ctrl key and press arrows to jump over words in a text for navigation or selection of text. I even had it configured that it would respect camelhumps. However after a new installation of Visual Studio these settings have been lost. I've also installed CodeRush, but haven't found anything like these features in there.
Edit versions added:
CodeRush v20.1.3, trial
Visual Studio 2019 16.4.6

I've found this function on the ALT key. In order to make it work on the CTRL key, that key had to be the only key with the function. If I made it an alternative key, the text editor would just lose focus when pressing CTRL+LEFT.

Related

VS 2017 (Ctrl+R) was pressed. Waiting for second key of chord

In Visual Studio 2015, Ctrl+R was globally mapped to Edit.NavigateTo. In VS 2017 Community, they've renamed this to Edit.GoToAll, which Ctrl+R is globally mapped to. But when I press Ctrl+R in C# editor, I get "(Ctrl+R) was pressed. Waiting for second key of chord..." and the dialog does not open.
What is hijacking Ctrl+R and how do I prevent it?
Aah, didn't notice that shortcuts in use was a dropdown with multiple values - thank you Hans Passant. Looks like Edit.ViewWhiteSpace defaults to Ctrl+R, Ctrl+W and that was making Ctrl+R not work at all. Odd.
I had a massive problem with chords where I couldn't even use "command Z" anymore. The way I was able to fix my chords issue was by editing the JSON file by following:
settings
preferences
keyboard shortcuts
while in keyboard shortcuts on the top right you will see an icon that looks like a file with an arrow on it. Click this. It will take you into keybindings.json.
Here you can view all chords, add, edit and delete chords. I removed my command z chord and everything was back to normal.

Visual Studio 2013 - Search Short Cuts (hot keys)

In visual Studio, is there a way I can set up hot keys to quickly switch between searching in all open documents, entire solution or current document?
It is sooooo slow to have to use the mouse to change the option from the ctrl+f or chift+ctrl+f search menu.
...gregory
Please see this
https://msdn.microsoft.com/en-us/library/5zwses53.aspx
On the menu bar, choose Tools, Options.
Expand Environment, and then choose Keyboard.
this is a command for find in files 'Edit.FindinFiles' default hot key is 'Ctrl + Shift + F'.
You add any new short key as you like
Hope this help....

Visual Studio : How can I remap the Ctrl+E key?

I am using Visual Studio 2013, and I would like Ctrl+E to map to Edit.LineEnd. Basically, the same thing that happens when you hit end.
I can remap it under options/environment/keyboard, but the problem is visual studio still treats Ctrl+E as a chord. Instead of going to the end of the line when I hit Ctrl+E I see a message below :
(Ctrl+E) was pressed. Waiting for second key of chord.
This does not happen when I remap Ctrl+A, Ctrl+N, Ctrl+P, Ctrl+F, or Ctrl+B.
This looks like a side effect of how Visual Studio layers command routing and key bindings...
If you look at the default bindings (my settings were based on the C# profile), you can see there are a ton of other bindings that start with Ctrl+E:
Important observations:
Each command has its context specified in parenthesis (Global, Text Editor, Workflow Designer)
There is already a multi-key (chord?) binding in the Text Editor
The Workflow Designer bindings don't matter/conflict because they're in a completely separate context
If you set your binding in the Global scope, it falls last on the priority (i.e. any specific context overrides a more generic one). Since you're in the text editor, it's trying to match the chord that exists in that context.
If you were to bind your new shortcut in the Text Editor (that's the dropdown labeled Use new shortcut in:, which defaults to Global), it would actually remove the keybinding for Edit.ToggleWordWrap. That's because you can't have a keybinding overlap with a chord, so VS assumes you really want the one you're trying to add and nukes the conflicts.
Alternatively, if you want to keep both, you could remap Edit.ToggleWordWrap to a different binding first.

Waiting for second key of chord

I have assigned the keyboard shortcut Ctrl+E to a command. But when I click Ctrl+E, the status bar says Ctrl+E was pressed. Waiting for the second key of the chord...".
If I hit the Esc key, I get "The key combination (Ctrl+E, Esc) is not a command."
How do I activate the command that has been assigned to Ctrl+E?
I know that this is the same as the question How do you stop Visual Studio from waiting for the second part of a shortcut-combination? . But the answer given there (hit Esc) does not work for me.
The selected answer is wrong in stating you cannot use Ctrl+E by itself (at least for Visual Studio 2013).
For those who come from a Mac or other OS background where Ctrl+E takes you to the end of the current line (the End key shortcut by default in VS), this is a really frustrating limitation when switching environments.
I found that in Visual Studio 2013 at least, you can remove all the shortcuts that use the Ctrl+E chord (none of which I will ever use) and set the Edit.LineEnd command to Ctrl+E. It just takes a few minutes tracking down the chords to remove (most of them are under the workspace designer).
To see which commands are using your keyboard shortcut at the moment, enter it
in the "Press shortcut keys:" edit box. Make sure you don't accidentally click "Assign".
In the dropdown box "Shortcut currently used by:" you can browse
through and manually remove all commands that
currently occupy your desired shortcut combination.
Key chords are a keyboard shortcut feature of Visual Studio. They consist of a sequence of key presses like (Ctrl+K, Ctrl+C) for comment code or (Ctrl+K, Ctrl+U) for uncomment code.
They are activated by the user pressing one Ctrl+key combination, then another Ctrl+key combo. For example Ctrl+K, Ctrl+C on my install of Visual Studio is used for commenting selected text.
In your case, Ctrl+E is a common chord starter and is used by many chords. For example Ctrl+E, Ctrl+W = Toggle Word Wrap and Ctrl+E, Ctrl+X = Workspace Designer.ExpandAll.
Depending on which developer setting you've chosen for the IDE, Visual Studio might have Ctrl+E mapped to other chords. In that situation, you cannot use Ctrl+E by itself for a keyboard shortcut
If this is the case, you can create your own chord, Ctrl+E, Ctrl+D is not in use on my install of Visual Studio 2012.
Edit:
Also if you remove all key chords that start with (Ctrl+E) then it can work as a non-chord shortcut.
And your question is not the same as the other question. In that question, the OP has started the chord process (Ctrl+E) and wants to cancel Visual Studio from waiting for the 2nd chord key.
I came to this question because I had the same problem as the OP, but in the Integrated Terminal of Visual Studio Code (not Visual Studio).
My problem:
I couldn't stop the node server by doing Ctrl+C, because my VS Code was waiting for the "second key of chord"...
I fixed it in the user settings, by unchecking the Allow Chords checkbox.
I answered the more suitable question for me here.
I have had the same issue with my "<" [backquote] key and wasn't able to find the right keybinding in the normal settings. Allow chords wouldn't do anything either.
This is for anyone, who isn't able to reasign the key in the default keybindings:
Find the User settings in your terminal.
Windows %APPDATA%\Code\User\
macOS $HOME/Library/Application Support/Code/User/
Linux $HOME/.config/Code/User/
Open the keybindings.json file
look for all chords that you would like gone.
(Obviously) remove/alter them
I hope I could help some of you!
You can disable it only for the integrated VSCode terminal by adding the following to your setttings.json file:
{
...
// Disable chords for terminal usage
"terminal.integrated.allowChords": false
...
}
Go to Tools -> Options.
A window will open up, In that Environment -> Keyboard -> Keyboard
And Just Press the Reset button on the right.
Screenshot
Do
ctrl+ E
then
ctrl + V
More info here:

alt+ctrl+f4 not working on visual studio 2005? but it did work previously

In VisualStudio .net (say 2005)
I have this shortcut Alt+Ctrl+F4 which closes all the opened windows. (Already mapped to window.closealldocuments)
and another one Alt+Ctrl+Shift+F4 to close all but this window.
Now both shortcuts used to work on my previous workstation.
Both having winxp 32.And i work on sv 2005 on both.
But on this new machine, Alt+Ctrl+F4 does not seem to propagate to Visual studio, like there's some other application or the explorer mapping this key to something else, and it's not propagating the event to vs process.
I know about the 'tools -> options...keyboard' in VS, but when I press the combination in the 'press shortcut keys:' field..
it would receive these combinations: Alt+Ctrl+F5->F10 but won't receive these: Alt+Ctrl+F1->F4.
It's like you didn't press nothing.
So now... any ideas?
the problem was a process that probably was receiving the key combination and not propagating it to the rest of applications.
in my case it was hkcmd.exe (intel's graphic something ) that captures key combinations to do certain things like display rotation and such.
anyway thanks hans passant for your comment.
These mappings aren't hard coded. Not sure what happened, but it is easy to remap them. Just go to Tools -> Options then:
Click in the top indicated text box, then press the key combination, and select the appropriate command for it. I like to use Ctrl + W to close the document and Ctrl + Shift + W for all.
You can set any hotkeys manually in any version of visual studio, just go to Tools->Options...-> Keyboard and assign any command to keys sequence

Resources