I make frequent use of SSMS's shortcut keys CTRL + K, C, to comment a block of code, and CTRL + K, U to uncomment.
Today, I went to do this, and noticed thatCTRL + K, U no longer works. Instead, it shifts focus to the availabile databases dialog in the top left of the screen, which apparently has the shortcut of CTRL + U.
I have checked the settings and CTRL + K, U is still mapped to uncomment selected code, but this is flat out not working.
Is this a bug, or something that I can fix?
SSMS v17.8.1
ApexSQL made patch to fix this problem
Choose Get updates for ApexSQL
Check show patches and press update
Seems to be an issue with ApexSQL refactor addin. I disabled it and the keyboard shortcut is working again.
Related
How to select the current word, that is where the caret is at.
Note: I am looking for the shortcut for Visual Studio Code(VS Code), the text editor, and not Visual Studio IDE.
On Mac OS: Cmd+D
On Windows & Linux: Ctrl+D
Above solved the purpose for me.
But ⌘D is defined as "editor.action.addSelectionToNextFindMatch", so if you press it more than once, it will try to search and select same word in the file which then can be used to do "multi word editing".
You are looking for Shrink/Expand Selection.
Trigger it with Shift+ Alt+Left and Shift + Alt+Right
Update:
This is now called Smart select API.
This feature uses semantic knowledge to intelligently expand selections for expressions, types, statements, classes, and imports.
It is Ctrl + D that works for me in latest Visual Studio Code on Windows.
Go to File -> Preferences -> Keyboard shortcuts, you will find this:
If you want to ctrl+w to behave the same as in Idea just go keyboard settings
Search for Expand selection. Set new shortcut cmd+w or ctrl+w depending on your OS.
Also re-bind other commands that use ctrl+w to use another shortcut that you want, for example cmd+f4
You can edit keybindings.json to avoid using UI.
Shift + Alt+Right Arrow if the word is in camelCase then you will have to click Right Arrow again to select the whole camelCase. Every time you press Right Arrow again while still holding Shift + Alt down you will select a further part of the code.
so:
first the word.
then if it's part of a camelCase then the camelCase.
then if it is in a string the whole string.
... (many other posibilities)
the whole line.
everything inside the parentheses code block
the whole file
at any given time you can go back to the last selection by clicking Left Arrow instead of Right Arrow
I don't know about CTRL + w in the old Visual Studio Code but in the JetBrains IDE's this is the equivalent to CTRL + w by holding down CTRL and clicking w to select more and holding down CTRL + Shift and clicking w to unselect.
Another possibility which helps to avoid selecting only one word in camelCase is CTRL + d this will just select the whole camelCase. This will however have the side-effect of also changing the current "find" criteria.
thanks Chandan Nayak for this extra shortcut.
An unpopular opinion: you can now have Resharper keybindings, if you come from Jetbrain's camp.
The Ctrl+W expansion grow and shrinks is different from expansion selection.
On "File/Preferences/Keyboard Shortcuts" I deleted the shortcut "Ctrl + W" to close the current tab action, because for this "Ctrl+F4" works for me.
Update (14 days later): Yesterday I installed VSCode 1.34.0 - I think since then the functionality is "Ctrl + D". I was very suprised.
For any editor, you can use the below shortcuts. These shortcuts work for every text area also.
Ctrl + Shift + LeftArrow/RightArrow - this will select text word by word
Shift + UpArrow/DownArrow - this will select text line by line
Ctrl + BackSpace - this will delete text word by word
Additional
in intellijIdea
Ctrl + w - use for the select current word, after giving second Ctrl + W it will select the second word also. Like that you can select the whole line.
Ctrl + d - you can duplicate current line.
When you press F3 or you hold Ctrl and click on something in Eclipse it takes you to where the thing your cursor is on was declared.
Is there a hotkey to come back to where you were before? Also, is there a way to keep a history of some sort to press it twice to go back twice? This would be useful when going on "wild goose chases" looking for something random in large code bases.
The only similar thing I know is Ctrl + Q to return to the last edit you made. Before going off you can change something arbitrarily and change it back, go hunting, and do Ctrl + Q to get back to the start.
Alt + Left Arrow (back in history)
Alt + Right Arrow (forward in history)
Netbeans has a nice set of keyboard shortcuts, but unfortunately, I can't seem to get all of them to work. Specifically, there's a keyboard shortcut for converting selected text to lowercase: Ctrl+U L. However, no matter how many times I try this (or variations on it), nothing happens I just get a 'ding' sound (it used to be that nothing happened). I check the Keymap option on Netbeans, and it shows that this is still the shortcut mapped to Ctrl+U L:
What am I doing wrong? How can I use this keyboard shortcut?
Note that Ctrl+; or Ctrl+Shift+; works just fine, among many other shortcuts.
To activate this shortcut you have to hit Ctrl+U then release Ctrl and then hit L.
It's like saying Ortomala Lokni
to uppercase a selection, press Ctrl + U then U without Ctrl
Let me add also:
to lowercase a selection, press Ctrl + U then L without Ctrl
to reverse case in the selection, press Ctrl + U then S wthout Ctrl
if you are using mac use command instead of control
Command + U + L to lowercase
Command + U + U to uppercase
I was trying to learn all the eclipse shortcuts... I couldn't find anything useful.
There are some shortcuts available for easy ones, like Find, Find in Files, Comment, Uncomment etc.
Is there any way to view all the eclipse shortcuts?
Clicking Ctrl+Shift+L from eclipse, will list all the shortcuts. This is pretty useful, as you don't need to switch to another window... You can do your work without any interruption.. :-)
Open Windows->Preferences->General->Keys. Now you can use the filter to find your shortcut and change its binding.
CTRL + SHIFT + L
Shows you a list of your currently defined shortcut keys.
However this will only show you custom short cuts that user have added therefore, Please find useful eclipse short-cuts below
CTRL + /
In line Comment
CTRL + SHIFT + /
Block Comment
CTRL + D
Delete row. Try it! You no longer need to grab the mouse and select the line, or select Home, Shift + End, Delete. Quick and clean.
ALT + Up/Down Arrow
Move the row (or the entire selection) up or down. Very useful when rearranging code. You can even select more rows and move them all at once. Notice, that it will be always correctly indented.
ALT + Left/Right Arrow
Move to the last location you edited. Imagine you just created a class "Foo", and now you are working on a class "Boo". Now, if you need to look at the "Foo" class, just press Alt+Left Arrow. Alt+Right Arrow brings you back to "Boo".
CTRL+SHIFT+O
Organize imports. What happens when you first use a class you have not yet imported? You will see an error. But when you press this magical combination, all your missing classes will be imported, and the unused imports will vanish.
CTRL+1
Probably the most useful one. It activates the quick fix. Imagine you create a class, which implements some interface. You will get an error, because the inherited methods are not yet implemented. While you are on line where the error occurs, press this combination to activate the quick fix. Now, select the "Add unimplemented methods" option. You can use the quick fix at every error you ever receive.
Quick fix comes in handy in other situations too. My favorite is the "Split variable declaration". Sometimes I need to broaden the scope of a variable. I activate the quick fix, split declaration, and use alt + arrow to put it where it belongs. You can find even more uses: Convert local variable to field, rename in file, inline local variable, etc...
You could use the "Split variable declaration" on the bar variable, and then move it with Alt+Arrows above the try block..
Or you could use the "Add unimplemented methods" fix here.
The best thing you can do if you see an error is to use the quick fix.
CTRL+SHIFT+T
Open Type. Imagine, that you need to have a look at the "Foo" class. But, where is the "Foo" class? Is it in the "Boo" project and in the "foo.bar" package? Or somewhere else? With this shortcut, you don't need to know. Just press it, type "Foo" and you are in.
CTRL+E
Shows you a list of all open editors.
CTRL+F6
Use to move between open editors. This is a slower alternative to Ctrl + E. It comes in handy in a situation when you want to periodically switch between two editors, something that is nearly impossible with Ctrl+E as it sorts entries quite randomly. Or you might just use Alt+Arrows...
CTRL+F7
Move between views. When in the editor, press Ctrl+F7 to switch to the Package Explorer, or hold Ctrl and press F7 multiple times to switch to other views.
CTRL+F8
Move between perspectives. The same as the previous.
CTRL + F11
Runs the application. What gets launched depends on your settings. It will either launch the last launched class (my preferred way) or it will launch the currently selected resource (the default way). If you want to change its behavior read the previous post.
CTL + N
Open new type wizard. This is not very quick because you have to select the wizard type (whether you want to create new class, jsp, xml or something else) in the next step. A much faster way would be if you could just hit the shortcut and invoke the particular wizard. It is possible, just keep reading...
CTRL + M
Maximize or umaximize current tab.
CTRL + I
Corrects indentation.
CTRL + SHIFT + F
Formats code. You can make beautiful looking code out of a mess with this. It requires a bit of setup, but it is well worth it. You can find its settings under Window->Preferences->Java->Code style->Formatter
CTRL + J
Incremental search. Similar to the search in firefox, it shows you results as you type. Don't be surprised if when you hit this combination nothing happens - at the first glance. Just start typing and eclipse will move your cursor to the first occurence.
CTRL+SHIFT+G
Bind this to "Generate getters and setters". This is a "must have".
ALT+C
Bind this to SVN/CVS "Commit".
ALT+U
Bind this to SVN/CVS "Update".
yes, you can go Window - Preferencee - General - Keys and see all available shortcuts. Also you can reorder keys here.
Also you can read more about eclipse shortcuts here
It's so easy to select a block of code and tab out, but how about the reverse?
Currently, I just search and replace for white space at the beginning of the line. Is there anything faster?
In Visual Studio and most other half decent IDEs you can simply do SHIFT+TAB. It does the opposite of just TAB.
I would think and hope that the IDEs you mention support this as well.
Shift-tab outdents again :)
The standard shortcut keys are covered in Standard Accelerators.
You'll find many of the more esoteric ones on FAQ What editor keyboard shortcuts are available?.
Here is a general answer for untab:
In Python IDLE: Ctrl + [
In Eclipse: Shift + Tab
In Visual Studio: Shift + Tab
In general, Shift + Tab works for any environment.
This workaround works most of the time. It uses Eclipse's 'smart insert' features instead:
Control + X to erase the selected block of text, and keep it for pasting.
Control + Shift + Enter, to open a new line for editing above the one you are at.
You might want to adjust the tabbing position at this point. This is where tabbing will start, unless you are at the beginning of the line.
Control + V to paste back the buffer.
I hope this helps until Shift + TAB is implemented in Eclipse.
Shift + Tab does that in Flex Builder (based on Eclipse), so it hopefully should work in regular Eclipse :)
In PyCharm, just use Shift + Tab to move a block of code left.
You can do this by going to the Window menu → Preferences, and then open the General list. Choose Keys.
Scroll down the list of keys until you see "Shift Left". Click that. Below that, you'll see some boxes, one of which lets you bind a key. It won't accept Shift + Tab, so I bound it to Shift + `. Apply Apply and Close, and you're all set.
Yes, in PyCharm: Shift + Tab works fine.
You can also change the shortcut. Use the Command + K, Command + S shortcuts to open the Keyboard Shortcut menu. Search for the "tab" and find the "outdent" in the list.