How to activate the cursor in VS2010 after pressing Ctrl-Tab? - visual-studio-2010

When you come from a tool window and press Ctrl+Tab to go back to an editor window, the cursor is gone and replaced with a "line cursor" that only allows to scroll up/down but not enter text. Is there a key I can press to get the normal cursor back?
(This is especially useful to quickly compile my code Ctrl+F7 and then just type on after pressing Ctrl+Tab without having to click the mouse)

Press Ctrl+F6 instead of Ctrl+Tab. This brings you the editor you last typed in with the cursor at the latest position.

Related

How to replace Discard changes with Do you want to save changes

If Esc key is pressed in
MODIFY FILE test
window, Visual FoxPro shows
Discard changes
Yes No
prompt. How can I replace this with
Do you want to save changes to test.txt
Yes No Cancel
prompt ?
A Yes/No/Cancel prompt appears if I click on the close button in the upper right corner of the close window.
Is it possible to force it to appear when I press ESC also ?
Can ON KEY LABEL esc or some custom edit windows command be used or is there some other solution ?
Yes, you could solve it with ON KEY LABEL esc someFunctionCall(). The function has then to display the dialog you desire, and you also have to write the logic whether you pressed Yes, No or Cancel. Also keep in mind, that you have to issue ON KEY LABEL esc again, so the dialog won't show up everywhere.
Another solution would be hitting CTRL+S before you press Escape. With another dialog you have to move the mouse or press another button anyways, so there is no time to safe here.

VS 2017 (Left Arrow) was pressed. Waiting for second key of chord

In Visual Studio, when I position my cursor to the right of the semi-colon of the following C#:
var alpha;
When I press the left cursor key, nothing happens (call me old-fashioned but I want the cursor to move to the left). Instead, I notice VS shows in the status bar
(Left Arrow) was pressed. Waiting for second key of chord...
How can I setup VS so that Left Arrow is not the start of a chord in the editor?
I can go to Keyboard options but how do I find chords that start with Left Arrow?
I couldn't find a way to do this with VS. However, I found Resharper's Shorts Live View feature (press the left Ctrl key three times in text editor) which displays current shortcuts to be valuable in reporting what actual shortcut had been assigned an are currently active.
It seems I must have pressed Left arrow when assigning a keyboard, so with this tool I could see the name of the command assigned and remove it from Tool | Options.

Visual Studio: Is there a keyboard shortcut to jump between code editor window and find results?

I can't seem to find the exact keyboard shortcut I'm looking for.
When I do a "Find in Files" (Ctrl + Shift + F), the keyboard navigation automatically jumps to the Find results, and I can navigate the results with the arrow keys; the code editor window updates itself as I do so, and pressing Enter pops me from the Find Results Window to the code editor Window.
Now, this is great for the initial search, but what if I want to bounce back and forth, say, if I need to make changes around a few different places in my find results?
Is there a keyboard shortcut to jump back from the code editor window to the find results?
I'm using MSVS 2013, if it matters.
If you have the General Development keyboard scheme, try: Alt + F6.
This is bound to the Window.NextPane which is where you just came from, so it should take you back.
Also, Alt + F7 is Window.NextToolWindowNav which pops up a nav selection which makes it easy to move around. This nav selection is the same one for Ctrl + Tab which, once open, can be navigated up, down, left and right via arrow keys.

FocusIn/FocusOut not generated

Can someone please clarify the default focus handling of the X11 server? My understanding is that the focus 'follows the mouse' and sure enough if I move the mouse between separate terminals I can see the cursor changing as each window aquires/loses the focus.
But when I run two xev windows and move the pointer between them, I see plenty of MotionNotify/EnterNotify/LeaveNotify as the pointer moves from one window to another - but FocusIn and FocusOut are nowhere to be seen. Is this an oddity in xev? Is there some special mask or property which needs to be applied in order for these events to be generated?
Many thanks, R.
While I do not fully understand the answer(s), I am grateful to parkydr, minitech and any others who may have stopped by.
Thanks again, R.
Having focus refers to the window which receives keyboard input when you press a key.
The focus handling depends on your window manager. The most common mode is click to focus, which your window manager is set to, where you only get focus when you click on the window. An alternative is that the keyboard focus follows the mouse, which is what you are expecting.
There should be a setting to change this in your window manager settings.
The cursor changing does not indicate focus, just that the terminal has defined a different cursor.
To demonstrate, open a terminal and an xev window.
Click on the xev window and press a key, you will see key events.
Move the mouse to the terminal window, you'll see the motion and leave events
Press a key and you'll still see key events from xev
Click on the terminal window, xev will give a focus out event
Press a key, the characters will be displayed in the terminal window
Move the mouse over the xev window and press a key, the character will still come out in the terminal window

Shortcut for Replace button in "Find and Replace" dialog

I call up Find and Replace dialog with Ctrl+H. On F3 it finds the result but then I must hunt the Replace button using the mouse. And on every new find, it changes the screen position. Is there any way to use this dialog using only keyboard?
It will save me a few precious seconds multiplied by some very large number (I'm in the middle of heavy refactoring).
In visual studio 2015:
Ctrl+H opens the Replace dialog.
Ctrl+F opens the Find dialog.
Within that dialog:
Alt+N - Focus "Find" entry field
Alt+P - Focus "Replace with" entry field
Alt+C - Toggle Match Case
Alt+W - Toggle Whole Word
Alt+E - Toggle Regular Expressions
Alt+L - Open "Look In" dropdown list. Use Up/Down and Enter to select from this list:
Current Block
Selection
Current Document
All Open Documents
Current Project
Current Solution
Alt+R - Replace Next
Alt+A - Replace All
Esc - Dismiss dialog
For example, to replace "foo" with "bar" within the current selection:
Ctrl+H - Opens the Replace dialog, with focus on "Search Term".
Enter "foo"
Alt+P - Focus is now on "Replacement Term"
Enter "bar"
Alt+L, choose "Selection", press Enter.
Alt+W - Whole word only
Alt+R - Replace first term
Esc - Close replace dialog.
Sorry,
As microsoft there is no keyboard shortcut as Replace Next,
You can check this url
http://msdn.microsoft.com/en-us/library/da5kh0wa.aspx
You could simply copy your desired replacement text before starting to F3 through your source text, and hit Ctrl+V when you hit the next match as VS selects the match text for you.
It is a hack, but it works.
If you dock the find/replace window then it will not move with each new find.
You can then alternate with 1 finger on F3 to move to next find, while hovering the mouse over the non-moving replace button to replace what you need.
It is possible to deactivate Resharper default behavior of "Alt+R" which provides a quick access to Resharper menu in Visual Studio.
Just uncheck it in Resharpers options:
enter image description here

Resources