How to apply bookmarks with a mouse click event on VisualStudioCode? - visual-studio-code

I have Visual Studio Code(VSCode) 1.10.1 version installed on Windows 7. I am new to VSCode.
At the moment, if I click on the left side of a file before the line numbers, a red dot appears which is the breakpoint. But, how to replace breakpoint with bookmark instead? It does work with ctrl+alt+k. But, I prefer a mouse click to apply bookmarks.
I searched through the settings.json file. Couldn't find anything relevant to this.

Press F1 in VSCode, type ext install and then look for Bookmarks.
For details check this - Are there bookmarks in Visual Studio Code?

Related

How to Show Code Runner Shortcut In VS Code

How can I show the Code Runner shortcut in Visual Studio Code if I mistakenly hid it?"
I was using Visual Studio Code and I accidentally hid the Code Runner shortcut. Is there a way to show it again? I have tried searching in the keyboard shortcuts settings but can't seem to find it. Any help would be appreciated (P.S I Know Many Of You will Say Use a Shortcut Key, or Reinstall the CodeRunner & VS Code But All Is Not Working)
How Can I get Code runner Shortcut Again
Make sure that you enabled your "Code Runner" extension
Go to the top right corner of VS Code to find a button that looks like three dots (...)
Right click on it and press "Run Code"
The Run Code button should reappear now

What is the equivalent shortcut for CTRL+D ("add selection to next find match") of VSCode in CLion?

Usually in Visual Studio Code, if I want to delete or modify a certain word from my file, I can highlight one of the words and then continuously press CTRL+D to highlight the rest of that same word in the file. But, in CLion, I am unable to find the equivalent shortcut.
I've Googled and searched here on StackOverflow but no luck. Maybe this shortcut doesn't exist in CLion? Can anyone confirm?
EDIT: It's also known as "Select next occurence" in other JetBrains products.
EDIT: The answer is ALT+J
it is alt+j in all of jetbrains products
So I just want to hit on a couple of options that you have, because I work with both CLion & VSCode as well, and needed the same exact keybinding in CLion.
KEYBINDING FUNCTIONALITY SEMANTICS
Unfortunately, it appears that no one cares about standardizing semantics when it comes to editor functionality/features, and keybindings. It can make moving from one editor to the next difficult, and flat out something many people just would rather not have to do.
Please Note:
_I am no expert on JetBrains IDE's, I am somewhat of an expert with VSCode though. I say this because, IDK how much JetBrains IDE's vary from one to the next, however, from having CLion, IntelliJ, and Access to Ryder I can tell you that in the standard IDE's the keymappings seem near Identical, but in Ryder, the keybindings are totally different.
DEV ENVIRONMENT
BOUND-KEYS (dev env's default)
SEMANTICS
CLion
ALT+J
"Add Selection for Next Occurrence"
Visual Studio Code
CTRL+D
"editor.action.addSelectionToNextFindMatch"
Visual Studio 2022 (IDE)
SHIFT+ALT+.
"Edit.insertNextMatchingCaret"
the The correct semantics for referring to the functionality you seek in CLion is contingent on the environment that its being implemented in. The following demonstrates how to correctly reference it in both JetBrains & Visual Studio Environments:
Add Selection To Next Find Match Ctrl+D editor.action.addSelectionToNextFindMatch
Once you know the semantics of the functionality that you want to customize, you no longer have to resort to using any editors default key mapping. You asked about, CLion, so I will demonstrate, in an image (or screenshot) below, how you can change the keybinding to be anything you want it to be.
To get to the window you see in the photo navigate by following the steps below.
Starting from the text editor, find the word 'FILE' on the 'MENUBAR' located at the very top of your screen.
Click on 'FILE' to drop open the 'FILE MENU'.
Scan through the __FILE MENU'_s ITEMS, until you see the selectable ITEM named 'SETTINGS' (it will have a wrench icon next to it).
4 Select 'SETTINGS' by left-clicking it, and you'll open the 'SETTINGS MENU' open.
Another 'LIST' will appear on the left side. There will be 'BOLD ITEMS' and regular weighted SUB ITEMS. Find the 'BOLD ITEM' that reads 'KEYMAP'.
Select 'KEYMAP'.
The image above shows the view in my IDE of the keymap menu. You can see a red arrow, as well as a green arrow, in the image.
GREEN ARROW
The green arrow shows where you can change the entire Keymap, as you can see in the image, mine is set to VSCode, and as far as I can tell, every keybinding is the same as in VSCode. You do have to download the VSCode keymap plugin though.
RED ARROW
The red arrow shows where the "Bound Keys" are listed. Right click on the keybinding and you'll see a menu that reads
Add Mouse Shortcut
Add Keyboard Shortcut
Add Abbreviation
"it may also have options for removing keybindings and mouse shortcuts, it all depends on how the keybinding you click on is configured"
To set the keybinding select Add Keyboard shortcut, and set it to what ever you want.

Disable the "refactor preview" confirmation tab

A few weeks ago, refactoring code using F2 worked without any confirmation. Since a few days, however, using F2 opens up a "Refactor preview" tab in the bottom panel.
The refactoring will not be done until I manually check what I want to refactor, and click the checkmark at the top right.
I cannot find anything online or in the vscode settings. Can this be disabled so that the refactoring automatically proceeds like it used to?
Are you accidentally pressing Shift + Enter after renaming?
This behavior should only happen after you press F2, change the name of the item, and then press Shift + Enter. Pressing only enter should automatically perform the rename without the refactor preview tab opening. The rename box states this:
In case its not clear, here is a video that illustrates this.
Note: This solution is only for c/c++ case. The reason is that C/C++ extension is doing bad in analyzing the code and relies on user to determine which ones to rename, then the preview panel is poped up for this.
Try disable Editor > Rename: Enable Preview in settings, and then restart vscode.
If the problem still exists, try replace C/C++ extension's intellisense with clangd:
Install clangd extension in vscode;
Disable C/C++ extension's intellisense by adding this to settings.json:
"C_Cpp.intelliSenseEngine": "Disabled"
Then vscode will adopt clangd's intellisense, which renames without a preview.
Uninstalling C/C++ extension is NOT recommended because intergrated gdb will be lost, but you can try lldb as a substitude:
Install CodeLLDB extension in vscode;
Configure cmake's default debug type to lldb in settings.json:
"cmake.debugConfig": {
"type": "lldb"
}

Ionide Intellisense quick fixes doesn't add code to file - F# Visual Studio Code

When I press CTRL+. for quick fixes or the click the light bulb (show fixes) I get the dialog in the below image. However, when I press enter or click an item in the quick fixes dialog no code is added to my document i.e. nothing happens.
Does anyone know how to fix this? In the given example, I'd expect selecting "Open System" to add the line "open System" at the top of the document.
Environment:
Windows 10
Visual Studio Code 1.46.1
Ionide-fsharp 4.14.0

How to show the extensions installed in Visual Studio Code?

How can I show the versions of the extensions installed in Visual Studio Code?
Also, but unrelated, does anyone know the maximum file size that can be handled by VS Code?
This will work from a command line:
code --list-extensions --show-versions
I do not know when this functionality was added. Sample output:
See CLI Options
Hit F1 or CTRL + SHIFT + P and enter show i :
Click on "Extensions Show Installed Extensions":
Open VS Code.
Go to Extensions (in left side-nav or icon with boxes ).
In search Extension type: #installed
You will be able to see all installed VS code extensions.
You can access in the right menu like bellow image with shortcut CTRL+SHIFT+X.
If does not appear, you can click on three points and then Show Installed Extensions.
You can Uninstall too in this path.
Click on Extension Icon present in left side panel.
It will display the extension list.
On top you can see three dots.
Click on this dots, it will display the installed extensions