Keyboard shortcut to close a tab in SQL Server Management Studio? - ssms

Is there a keyboard shortcut to close a tab in SQL Server Management Studio 2008? like Alt-W in Firefox.

The shortcut Ctrl+F4 should work.

I know this is old, but you can also change it to Ctrl + w if you want:
In Tools | Options | Environment | Keyboard
Search for Edit.SelectCurrentWord and change it to something else (Like Ctrl + B).
Search for Window.CloseDocumentWindow. Add CTRL+W as a Global shortcut
(Credits to https://gist.github.com/jpoehls/2030795)

#Lance, thanks for you answer. It works, and it makes life easier.
In addition, after doing Alt-F,C you can also press N if it shows you a 'save changes' confirmation dialog.

Related

How can I select next occurrence in IDEA editors

Ctrl+D performs the find_under_expand command in sublime. This basically searched for the next occurrence of the already selected text and selected it, so when I edit, it's edited on both places at the same time. I'm currently trying to move to IDEA editors (such as WebStorm, PHPStorm, PyCharm, etc) but didn't find something like this command in this IDE yet.
I believe they recently added this to the latest IntelliJ release, and I would assume PhpStorm as well. As the bindings are system specific, take a look at http://blog.jetbrains.com/phpstorm/2014/03/working-with-multiple-selection-in-phpstorm-8-eap/. Looks like that version is available through EAP, so don't know when they will release it for general consumption (or if they have already).
DEFAULT SHORTCUTS
Alt+J on Windows and Linux, Ctrl+G on Mac OS X
On Mac OS X, you can select the next occurrence with Ctrl+G
In the settings window, search for ”Add Selection for Next Occurence” (PhpStorm 8.0.1)
On mac the default is ctrl+G, but you can change it to ctrl+D (or cmd+D on mac)
Currently its mapped with
for selection, Alt + J
for unselection, Alt + Shift + J
but if you're familiar with sublime shortcuts like Ctrl + D
Jetbrains give you an option to change settings,
Settings -> Keymap -> Editor Actions
search for multiple selection, find Alt + J
then right click -> select change keyboard shortcuts
set shortcuts you want as like sublime, Ctrl + D
Here is the Docs
On Windows
Alt+j - Multiple Select
Alt+Shift+j - Unselect Multiple Select
I think what you want to do is refactor it at all the place in the file at once.
So in MAC machine the handy shortcut for it is shift + F6 (you may have have to use fn key before F6).
Click on the text you want to change and then press shift + F6. It will highlight the text and then your change at all the place in the file. :)
It will do the job same as sublime ctrl + D
PhpStorm has a "Select Word at Caret", Ctl+W and Ctl+Shift+W respectively (you can check your keys by searching under Preferences > Keymap).
Detail here:
http://www.jetbrains.com/phpstorm/webhelp/selecting-text-in-the-editor.html#d617165e275
Not entirely sure if it's the same as you mentioned, but it's mighty handy!

Ctrl R not working in SQL Server 2012

In SQL Server 2012, Ctrl+R not working. Any other shortcuts for that.
Any setting changes available or is there any alternative?
Go to Tools > Options > Environment > Keyboard / General.
In the middle box,
Select Window.ShowResultsPane
Change the Use new shortcut dropdown to SQL Query Editor (Global did not work for me)
Put your cursor in the "Press shortcut keys:" box and hit CTRL + R. You should see the following:
Click Assign and then OK.
Unlike some other changes that still require an SSMS restart to take effect, the change takes effect immediately, and CTRL + R should start working again.
I blogged about this three years ago.
Another way is to select Default and hit the Reset button. This worked for me.
I'm using Microsoft SQL Server Management Studio version 11.0.3128.0 (SSMS 2012).
Started having the above issue for no aparent reason.
Solved like this: click "Tools -> Options". On the options window, open Environment -> Keyboard on the tree. Then, on the right, press the "Reset" button.
Worked for me.
I am using Microsoft SQL Server Management Studio version 12.0.4100.1 (SSMS 2014).
I had the same issue and resolved it by following below steps -
Click "Tools -> Options".
On the Options window, expand Environment -> Keyboard -> Keyboard.
Then, in the right side panel, press the "Reset" button.
Go to the Keyboard Settings as mentioned by #aaron and then change the keyboard mapping scheme (first drop down). This gave me back the shortcuts that I am used to like Ctrl+R and Ctrl+E
I am troubled with this after I installed Visual Studio 2015. When Ctrl+N is pressed in SSMS, instead of opening a query window, SSMS showed up selection page of the VS files. A Reset as posted above revert to SSMS shortcuts.
Thanks for the posts.
--In 'thoughts'...

How to bring back parameters documentation popup in SQL Server

I would like to make this appear when I want to in SQL Server.
Is there a keyboard shortcut for it ? I saw a similar question for the one in Visual Studio where you pressed Ctrl + Shift + Space.
install sql prompt software for that to use like this popup in sql-2005.

Attach a keyboard shortcut to 'Collapse All' items in solution explorer with Visual Studio 2012

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 ;-)

How to move focus to another "tab group" in Intellij IDEs

IDEs based on the IntelliJ platform let you split the editor in various ways, but I don't see an option to move focus from one editor to another using just keyboard (something like other-window from Emacs).
Is there an "action" to do that?
For mac users, the default shortcut is option + tab
I think you're already find answer, but for someone who have same question and find this post like me.
Go to Prefernces -> Keymap or simple use search in preference and find Goto Next Splitter and make your own hotkey for this action.
Main Menu Window | Editor Tabs | Select Next/Previous Tab
There's also Switcher (Ctrl+Tab) available in the same menu as Goto Next/Previous Splitter which switches between splitted editor parts, tool windows, and many other things.
For macOS it is option + tab keys to switch between tab groups
ctrl + tab works for Windows system.