In my keyboard, the letter c and q is broken. My intention is to replace it with right ctrl+S and right ctrl+K, with the intention to make left ctrl works normally. It works to type just c and q, but suddenly left ctrl+s means s and left ctrl+k means k, instead of a normal ctrl+s. I also intend to make it work when both ctrl is pressed, so left ctrl+right ctrl+s is ctrl+c, which is used to copy a text.
Basically:
Left ctrl = normal
right ctrl = type the broken letter
both key needs to compose, so I can type left ctrl + right ctrl + s
My current code is:
>^s::send c
>^k::send q
Note that both ctrl works normally for other letters. How to fix that?
Also, if this is still the same question, it also doesn't work with capslock and shift. If the answer also fixes that, I will appreciate that.
Related
When you press Ctrl + Shift + P (or whatever you bind it to) in VS Code a Command Palette pops up. It brings up a magical textbox with a angle bracket > string in it that you can type in to access commands, like >fold all.
But most of the time I instead use this magical textbox to search for functions or objects in my code via #function or in all dependencies via #function, or just open files myfile.py.
So every time I press Ctrl + Shift + P I immediately have to follow it up with a backspace to remove angle bracket >, so that the string in the magical textbox starts with the appropriate # or # character instad of >.
Sadly, typing >#function does not search for function, so the angle bracket > has to be removed manually.
How do I get VS Code to bring up the magical textbox but not insert the angle character >?
(Note: I know I could just write an AHK or similar macro to follow up Ctrl + Shift + P with a backspace, but I don't trust backspaces in a macro.)
Alternately, how do I access a search box with similar #function search behaviour? (The answer is definitely not Ctrl + F.)
You can look the shortcuts just type Keyboard Shortcuts in the command pallet (or magic textbox :D) and search for "Go to File", default it is CTRL+P
In sublime text CTRL + LM adds a cursor and feels much more natural than ALT + LM, because I keep accidentally clicking the space bar and inserting a space.
I also like the VSC CTRL + LM file path peek option, but I just want to reverse the two buttons.
So inserts cursor should be: CTRL + LM
And peek path should be: ALT + LM
I can't find them anywhere in the key bindings shortcuts. Where are these two settings?
There is currently no possibility to customize any of the mouse related functionality in VS Code.
There is an open issue, though, that you can "thumbs up" and follow.
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