is it possible to scroll down in Visual Studio 2022 just as if I was using scroll wheel? Say for example using some shortcut. I want to keep the cursor at the same line I am at, but move the code a little higher on the screen, without getting my hands off keyboard.
As was mentioned in the comments, the default keybinding for this are Ctrl+Up and Ctrl+Down. Keyboard shortcuts can also be reconfigured in the Tools -> Options -> Environment -> Keyboard settings.
The commands to configure are Edit.ScrollLineUp and Edit.ScrollLineDown. There are several other scroll related commands, but I'm not sure what all of them do (they may not be applicable in the text editor).
Related
I am trying to use the keyboard shortcut Shift+Command+[Left|Right|Up|Down] to resize windows in intelliJ. But it doesn't work. Weirdly, in Window->Active Tool Window -> Resize I do see the option to apply the same options Stretch To [Left|Right|Up|Down] along with the corresponding shortcut key combination and that usually works for all windows except the editor window in which all the four options are shadowed even when the editor windows isn't stretched to it's full extent. Anyone has any idea on what is going on? I can do the resizing using the mouse.
It's because these shortcuts only work in tool windows and the editor is not a tool window. From Tool Windows:
Attached to the bottom and sides of the workspace are IntelliJ IDEA tool windows.
[...]
Within the editor, the shortcuts have different meaning:
ShiftCommand← – Move caret to line start with selection
ShiftCommand→ – Move caret to line end with selection
ShiftCommand↑ – Move statment up
ShiftCommand↓ – Move statment down
The editor doesn't have a specific size, it uses the available space. To make it larger or smaller, you have to resize the attached tool windows.
I'm using Visual Studio 2017 and have followed the instructions in this answer to change the behaviour of Ctrl+Tab and Ctrl+Shift+Tab to switch to next and previous tab, respectively.
Problem is, while Ctrl+Tab works fine, Ctrl+Shift+Tab only switches to the previous tab when the current document is not a Web Form or similar (e.g. master page). On those pages, the combo switches between Source, Design and Split view instead. How can I disable this behaviour?
I've looked through the keyboard shortcuts in Visual Studio settings and haven't found any others that are mapped to that combination. I've even disabled Web Forms designer (so only Source view is available), but it doesn't help, Ctrl+Shift+Tab simply doesn't do anything then.
Set the shortcut keys for the Window.PreviousTabAndAddToSelection command in the HTML Editor Source View (instead of Global) to Ctrl+Shift+Tab. This has the minor side effect of selecting the previous tab when navigating away from a web form tab, but successfully avoids the unexpected behavior of taking you to the split or design sub tabs.
how can I modify Visual Studio 2015 to be able to search the internet (my fav search engine happens to be google) from the context menu in the code editor?
Ideally, I would like it to open as a new tab in my (default) external browser, because the internal web browser is still...lacking, shall we say?
I found one extension "web search" for older VS, but I have found no extension that works with VS 2015. I found no article that still works.
For comparison, when you're in Chrome, you can select some text, right click and say Search Google for 'what you selected'.
I think this would be handy when learning new technologies from a project that uses those technologies, or just for help.
Ok this turned out to be fairly easy. I just added a tool to Tools, External Tools
Command: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
Arguments: https://www.google.com/?gws_rd=ssl#newwindow=1&safe=active&q=%22$(CurText)%22
I enclosed the $(CurText) variable around quotes (%22) so that it would search on the exact phrase.
Then, to make it more accessible and actually put it in the context menu (and other places), I clicked the Move Up button to make it the first command, then customized the Standard toolbar to include Tools.External Command 1. I also added it to Other Context Menus | Html Context and Editor Context Menus | Code Window
Then I also went into Tools, Options, Keyboard and associated Tools.ExternalCommand1 with Alt+G
IMPORTANT: Because Visual Studio (still, in 2015) doesn't save some modifications to the IDE until it shuts down, you need to shut down all other instances of VS and then lastly shut down the instance that you used to enact these IDE modifications for them to "stick". And, if VS 2015 is like previous versions, be prepared for the menu / toolbar modifications to simply go away one day, at which point you'll just have to redo them.
Like I said in the title of this question, is it possible to attach a keyboard shortcut to collapse all items in the solution explorer with Visual Studio 2012?
In previous version; 2010, I was able to create a macro to enable this feature but in Visual Studio 2012, there is no more support for macros.
I'm able to right click onto item in the solution explorer and choose 'Collapse All' but I prefer to just typed 'Ctrl+Shift+C' to do the same job.
FWIW, this is the best I've been able to come up with so far.
Alternative 1
Press Ctrl+¨ to put focus in the search box above the Solution Explorer.
Press Shift+Tab to move focus to the toolbar.
Use the left arrow to move focus to the left, until you hit the Collapse All button (four times. YMMV).
Alternative 2
Press Ctrl+Alt+l (or whatever your personal shortcut is) to focus the Solution Explorer.
Press Shift+Alt to focus the Solution Explorer toolbar. This puts the focus on the Home button on the toolbar.
Use the right arrow to move focus to the right, until you hit the Collapse All button (three times).
Press Enter.
Alternative 3
Press Ctrl+Alt+l (or whatever your personal shortcut is) to focus the Solution Explorer.
Press and hold the left arrow until you've reached the top node (the Solution node).
Press the up arrow to put focus in the search box above the Solution Explorer.
Press Shift+Tab to move focus to the toolbar.
Use the left arrow to move focus to the left, until you hit the Collapse All button (two times. YMMV).
As you can see in the screenshot below, there is an option called Collapse All and a shortcut key next to it.
Now this shortcut key will not work for you !
Unless ofcourse, you set it up using Tools > Options > Keyboard. The command name is CollapseInSolutionExplorerAction. Search using this command name and assign a shortcut key of your choice.
That's it and you are ready to use your shortcut key !
Source
Visual Studio 2012 / ReSharper 8.0.1:
The command is 'ProjectAndSolutionContextMenus.Project.ReSharper_CollapseInSolutionExplorer'.
I suggest you to try CodeMaid extension for Visual Studio. It provides a command "Collapse All Projects Recursively" that has customizable shortcut (by default, it is Ctrl+M,-). It has some other nice abilities, like switching between .cpp and its .h files, joining lines, etc.
I have searched on the net a way to do this when I have first install VS2012 ..
I have just found the solution, so I share it :)
you can do this by adding your visual studio version to an existing Extension ...
Download the extension for VS 10
Change the extension from vsix to zip
extract it and open the file extension.vsixmanifest
Find this xml section : SupportedProducts
Add this :
<VisualStudio Version="11.0">
<Edition>Ultimate</Edition>
<Edition>Premium</Edition>
<Edition>Pro</Edition>
</VisualStudio>
you can also try version 12 for visual studio 2013 ...
zip it, and change the extension from zip to vsix.
Now you can Install it.
after install it, Goto Tools -> Customise and click on the keyboard button.
Search "CrossProjectMultiProject.CollapseProjects" and assing the shortcut you like.
Have a nice codding.
Please +1 if this help you
ps. sorry for my bad English, im French ;-)
Whilst fiddling recently with Ulysses 2.0 - "The definitive creative writing package", I was struck by how effective the fullscreen/console mode was at focusing my mind on actually getting words on the page.
Are there any code editors that include a similar function? Or even a hack that allows code highlighting in Ulysees?
Preferably, for me, OSX, but feel free to list alternatives for others.
Any console based editor (vim, emacs, nano, ...) can be used in full screen mode, as long as the terminal in which it is run supports it. And I'd wager that most or all do. Usually this functionality is bound to F11 or Alt+Enter.
MacVim has a fullscreen mode: :set fullscreen, :help fullscreen, and ⇧⌘F.
Visual Studio has a fullscreen mode via pressing Shift+Alt+Enter.
Notepad++ has fullscreen mode by pressing F11 (or f12 i can't decide).
I use Think from Freeverse. It's a free utility that highlights your current app and simply darkens everything else, enabling you to focus on your document.
You can use it with your favorite editor. If you use Eclipse, you can double click the editor tab to maximize it, collapsing all other views. You can also customize the colors (if you prefer white text on dark background). It's not quite the same, but not bad.
This is going to end up a long list!
I use Textpad as my text editor when not using Visual Studio - http://www.textpad.com - and it has a fullscreen mode.