Previous in I have used ctr+d for duplicating the code many times, but when I switched to desktop and installed vs code and all the necessary extensions for my react project. And now this CTRL+D keyboard shortcut is not working. Can any help me to solve this issue
I recently met this issue too. I found a solution, see this: https://linuxpip.org/duplicate-lines-vscode/.
The main step are:
File > Preferences > Keyboard Shortcuts.
type "copy line",then you will see the related shortcuts.
remember the new shortcut(e.g. Shift + Alt + Down) or modify the shortcut to ctrl + D.
shift + alt + arrow-down works for me.
For me it was a VS Code extension causing the ctrl + ... binds not to work. It was "Vim emulation". Try isolating the issue by uninstalling the extensions until you find which one.
Similar issue for Windows 10, resolved using CTRL + F2.
Related
For example, 'find all references' was Ctrl + Shift + F12, now seems to be Ctr + K + R
Is this a user setting or changed during a new build of VS?
Shortcut is still same. I think you might have installed extensions like ReSharper, so it might be due to that. Please uninstall extension and then check.
Reference: https://developercommunity.visualstudio.com/comments/530592/view.html
The change could have many reasons: Change of keyboard language, the configuration file might have changed something or an extension was installed.
On Windows, the shortcut CTRL + SHIFT + A to open the Find Action popup is not working. I've tried re-installing the whole IntelliJ IDE already but the issue still persists, anyone who has experienced this issue?
I'm using version 2019.2 since this is my Ultimate license.
What could be the work around for this issue?
I don't have an exact idea what has happened. But there may be some shortcut conflicts.
As an example, same shortcut keys will do different jobs based on the focus location. As an example my Ctrl + D key combination do lot of jobs as shown below,
You can find the shortcut actions assigned to Ctrl + Shift + A, by going to Settings > Keymap, and with using Find Actions by Shortcut as shown below;
Then you can clarify actions assigned for your Ctrl + Shift + A.
I opened few files during coding (both files in project and out project). After that, I close few in its (by ctrl+w and click the 'x' button).
When type ctrl+tab, I always see all opened files.
I try to restart VSCode, restart Windows but nothing change.
How do I close unnecessary files?
I use VS Code 1.0 + Windows 10.
Edit: This feature added in new versions
If you want to clear a specific item (not the whole list) from the recently opened list you have to
Press Ctrl + SHIFT + P
Type Remove From History (in earlier version it is Remove From Editor History) and press Enter
Choose/Find the file you want to clear
Source: link
Update 09.04.2020:
With the release of Visual Studio Code 1.44.0 you can easily remove a file using the UI. You see a closing x next to a file in this recently opened files view:
I could be mistaken but you don't want to delete, but "clear" recently opened files. If that is the case, then follow these steps in regards to VS Code version 1.15.0:
Press Ctrl + Shift + P
Then, within the Quick Open bar, type in >Clear Recently Opened
Press Enter, restart Visual Studio Code, and you should now see nothing under Recent.
Cmd + Shift + P
Clear Editor History
I have just found a workaround which seems to remove a single directory from recents, in case you do not wish to remove all of them.
Press ctrl+shift+p (you may need command+shift+p instead if using a Mac) and select File: Open Recent...
After you click on that, you should see a dropdown with your recently opened projects. Hover with the mouse on the one you want to delete and towards the end of the line you're hovering you should see a small x appearing
Click on that x and you're all done
For latest Visual Studio Code (1.54.2):
View-Command Palette or Ctrl + Shift + P
in the Command Palette dialog box: File: Clear Recently Opened
Restart Visual Studio Code
Press Ctrl + SHIFT + O
You can see recently opened projects and files list
Click the cross icon (X) to remove
It returns your caret(aka cursor) to the place where you stopped writing code(very useful for fast code browsing)
Ctrl + - will move to the previously browsed line of code (Ctrl + Shift + - will move forward). You can download PDF versions of all the default keybindings in Visual Studio 2010 from this page.
ReSharper has Ctrl+Shift-Backspace to return to previous editing position. Or Ctrl+Shift+, (Comma) to browse some recent edition places.
In addition to what is mentioned in the other answers, you can use the undo/redo trick. As long as you want to navigate to the last edit position in the current file, a quick undo/redo will take you there.
You are looking for View.NavigateBackward. The actual keystroke depends on your personal settings, but it's probably Ctrl + -. If not, go to Tools/Customize/Commands/Keyboard to find out what it is for your setup.
There are ctrl+- and ctrl+shift+- That navigate backward and forward.
What's the keyboard shortcut for Visual Studio to display the IntelliSense box if one accidentally hits ESC and wants the box come back again?
Additionally, Ctrl + K, Ctrl + I shows you Quick info (handy inside parameters)
Ctrl+Shift+Space shows you parameter information.
Ctrl + Space
or
Ctrl + J
You can also go to menu Tools → Options → Environment → Keyboard and check what is assigned to these shortcuts. The command name should be Edit.CompleteWord.
The most efficient one is Ctrl + ..
It helps to automate insertions of using directives. It works if the focus is on a new identifier, e.g. class name.
Ctrl+Space should do it.
It should be Ctrl + J.
If you have arrived at this question because IntelliSense has stopped working properly and you are hoping to force it to show you what you need, then most likely none of these solutions are going to work.
Closing and restarting Visual Studio should fix the problem.
If you want to change whether it highlights the best fitting possibility, use:
Ctrl + Alt + Space
Alt + Right Arrow and Alt + Numpad 6 (if Num Lock is disabled) are also possibilities.
In Visual Studio 2015 this shortcut opens a preview of the definition which even works through typedefs and #defines.
Ctrl + , (comma)
On Visual Studio Community 7.5.3 on Mac this works for me:
Ctrl + Space
The shortcut to bring up the IntelliSense box is called Edit.ListMembers. It defaults to:
Ctrl + J
The shortcut to automatically select the most likely option is Edit.CompleteWord. It defaults to:
Ctrl + Space