I always found myself rolling the mouse wheel when programming for my project in visual studio 2013. I always need to look through my program code like at line 23 and then modify the code at line 220 and keep forth and backward. It get my eyes tired easily. Is there any tricks to help me save some reference points?
In the upper right corner of your code window there is a little arrow type icon which you can drag down to allow viewing of 2 different areas of the same window/tab. Very helpful when you are needing to go up and down in the same window.
Menu Window -> Split
Or as said Yosem above you can use arrow at corner of code window.
UPD. Also you can make a bookmarks for any lines you want. It's in menu Edit -> Bookmarks -> Toggle bookmark (by default shortcut is ctrl+K, ctrl+K or ctrl+F2). Then you can easily go to next/previous bookmark by pressing F2 / shift+F2
Related
I am trying to find a keyboard shortcuts to navigate thru IntelliSense suggestion arrows (marked area on the pic).
I have got somewhere a tip (and tested it) to hit escape key, which closes the bottom right box and then arrows will navigate the left box.
Is it possible to scroll horizontally with the keyboard/mouse wheel in Visual Studio? I can do this via Ctrl + Up or Ctrl + Down, or just use the mouse wheel, for vertical scrolling, but I could not find out how to scroll left/right via Googling. I'm using Visual Studio 2017 RC.
edit: Just came across this, but it seems to be only compatible with VS2015. When I tried to use it with VS2017, it errored out.
One approach is to directly modify IWpfTextView.ViewportLeft for the active view. You can use the following two commands Scroll the current text editor horizontally for my Visual Commander extension and assign to them shortcuts like Ctrl+Right Arrow and Ctrl+Left Arrow.
You can assign custom keybindings to the Edit.ScrollColumnLeft and Edit.ScrollColumnRight commands. To do so:
Open Tools -> Options -> Environment -> Keyboard
Show commands containing 'ScrollCol' (short enough to find these two)
For each command, set focus in the Press Shortcut Keys box and type your desired shortcut.
When you've found the keybinding you want, click the Assign button to save it.
In the image below you can see that I've set Ctrl+Alt+Right to map to Edit.ScrollColumnRight, and Ctrl+Left is already assigned to the Edit.WordPrevious command when in the Text Editor.
Maybe, if you click in the center button on the mouse and then navigate across?
You need to go manage entension and search 'slideScroller' extension. Downloand and install. It's done. After then scroll horizontally with shift+left Mouse.
In Eclipse when you click twice on the tab of the editors Eclipse hide all other windows except the one you write code in and when you do that again(clicking the tab of the document all windows comeback again).
Is there a similar feature in Visual Studio 2013?
Update: I found Auto Hide in Window Menu, but I don't want auto hide, I want to click something to hide windows and click again to show them.
As a programmer i love shortcut keys which is very helpful for productive work. I've search question as you mentioned. But i did not get proper answer. then i've searched solution for me which might helpful to you.
Step 1: Go to visual studio
Step 2: From tool menu open Options menu
Step 3: Go Environment -> Keyboard
Step 4: Select item Window.AutoHideAll from list
Step 5: Set short cut in "Press shortcut keys textbox". I've set Ctrl+Alt+] then click on Assign & then ok.
Step 6: Final step. Use above shortcut to hide all window other than editor window.
View | Full Screen
(In my key bindings: shift+ctrl+enter.)
However, double clicking on an editor tab also works, this is provided by one of the extensions I use, but I'm not sure which.)
Richards answer does work, but has the side effect of maximizing the whole of Visual Studio as well. Sometimes (e.g. when comparing editor text to some other text), I would like Visual Studio to only take half the screen. A solution I found in Visual Studio 2019 was:
Window | Save Window Layout (call it something like Normal layout)
Unpin all the other panes you don't want to see, ToolBox, Solution Explorer, Build Results etc. Typically Left, Right and Bottom
Window | Save Window Layout, call it say maximized Editor.
Window | Apply Window Layout, you can choose Normal or Maximized editor
Visual Studio assigns these shortcut keys automatically of Ctrl+Alt+1 and Ctrl+Alt+2 to the first two Apply Window Layout choices
In Xcode, I am big fan of the assitant editor that shows me the corresponding .h or .m for the file that I am editing.
Is there a shortcut that allows me to swap focus between this two windows? I frequently switch between the two and using the mouse every time is annoying.
New answer:
Move Focus To Editor — commandj followed by ←/↑/↓/→ and return
This goes nicely together with commandshiftj which is Reveal in Project Navigator.
Old answer:
Use optioncommand` keyboard shortcut.
It can be remapped in Preferences - Keyboard Bindings - Move Focus To Next Area.
Edit: Removed XVim recommendation.
#Oneiros: Not quite what the OP was asking for..
I don't know of a 'short' shortcut but there's Cmd-J showing a popup where you can choose what to focus.
I made this to help answer another question... Does it help?
Xcode 8+
This is the easiest option:
^` - Move Focus to Next Editor
When using multiple assistant editors, ⇧^` moves focus to previous editor.
Xcode 4+
⌥⌘` - Move Focus to Next Area
⇧⌥⌘` - Move Focus to Previous Area
Using this option you can switch between Project Navigator (left pane), Primary Editor, Assistant Editors, Utility Area (right pane), Debug Area, etc.
⌘J - Move Focus to Editor...
Using this option you can choose where to move the focus using graphical navigation chooser.
For Xcode 4.4:
Use Cmd+Option+` (left to number 1) to Move Focus to Next Area, and use Cmd+Option+Shift+` to Move Focus to Previous Area
For Xcode 4.3:
If you only have the Editor and Assistant open, use Cmd+Option+. to switch between them (Navigator>Move Focus to next area)
Also, if you want to open a different file in the right pane, like the .xib or any other, press
Command ⌘shift ⇧o
The open quickly window will appear, search the file, use capital letters to filter through camel case notation, then press
Alt ⌥enter ↵
The file will be opened in the assistant window
Switching between .h and .m:
Control ^Command ⌘Up Arrow ↑
You can do this:
Assume you have Standart(S) and Assistance(A) editor opened and you want swap them.
1) Double tap with holded Alt to line in navigation bar of S editor with file name (look screenshot). This file will open in A editor.
2) In A editor tap Go Back and do 1. File from A editor will be opened in S editor.
3) In A editor tap Go Forward.
DONE!
I'm somewhat new to XCode and am very accustomed to using Visual Assist with Visual Studio. In XCode, I see the function menu above the text editor but can't seem to find a keyboard shortcut to pop it down. It seems to require a mouse click. It would be nice to have as this is yet another tool for better code navigation and is easily accomplished with Visual Assist using Alt-m.
Anyone know the magic incantation for XCode?
Ctrl + 6 opens the function menu for me.
Take a look under View > Editor for some related shortcuts. (See note below)
Unsurprisingly, you can start typing the name of the function to select it, instead of using the arrow keys.
I'm using Xcode 4, by the way.
NOTE:
The program CheatSheet lets you see a list of all keyboard shortcuts in the current program by holding down the command key (⌘) for 2 seconds.
Control 2
should do the trick