How can I disable auto prefill of the editor's find/search box? - visual-studio-code

In VS Code, if I press control+F to search, it auto prefills the search box with the word under the cursor. Is there a way to disable that behavior?

For the editor finder (AKA "search"), put the following in your settings.json:
"editor.find.seedSearchStringFromSelection": "never"
The setting's description:
Controls whether the search string in the Find Widget is seeded from the editor selection.
Bonus material: For the search panel in the sidebar (ctrl+shift+f / View: Show Search), put the following in your settings.json:
"search.seedOnFocus": true,
// "search.seedWithNearestWord": true, // optional

Related

VSCode - Disable font ligatures in find and replace boxes

I want to disable font ligatures in the find and replace text boxes. For example, if I want to search for </ (HTML closing tags pattern) it changes it to downward arrow ligature:
I already have "editor.fontLigatures": false, set in my settings.json but this doesn't seem to be affecting the search box. Same behaviour is visible in the Global Search menu.
Search still does work but I don't want to see the ligature. How can I disable this ?
Thanks!

How to disable info box in visual studio code

Quick question, I seem to be unable to guess the name of this "info box" properly, so google won't find me the right solution to disable this.
Its called Intellisense in VSCode terms and you can configure it accordingly with these settings in you settings.json files
Go to File -> Preferences -> Settings
Search and click on "Edit in settings.json"
// Controls if quick suggestions should show up or not while typing
"editor.quickSuggestions": false,
// Enables parameter hints
"editor.parameterHints": false,
// Controls if suggestions should automatically show up when typing trigger characters
"editor.suggestOnTriggerCharacters": false,
If you want to access these features even after disabling these, you can use the keyboard shortcuts.
CTRL+SPACE - Trigger Suggestions
CTRL+SHIFT+SPACE - Trigger Parameter Hitns

VSCode doesn't autocomplete when text is highlighted after another autocompletion

When editing text on visual studio code, when I use autocomplete for something (like in the picture)
https://i.stack.imgur.com/0WKnm.png
It highlights my text (while typing) and autocomplete stops working
https://i.stack.imgur.com/HjK6T.png
Same goes when I autocomplete an if statement
https://i.stack.imgur.com/WPNVX.png
Is there any way to disable that highlight, or make it autocomplete even with the highlight?
Add this in your settings.json file, it'll prevent this behaviour:
"editor.suggest.snippetsPreventQuickSuggestions": true,
If you wanted autocomplete dropdown while code is highlighted
(for example: After you performed an autocomplete and VS Code auto highlights for you):
"editor.suggest.snippetsPreventQuickSuggestions": false,
^^^ in your settings.json ^^^
Example action:
Editing a html doc: you typed 'clas...' in a div
<div clas..>
Something...
<div>
It should autocomplete to
<div class="HIGHLIGHTEDTXT">
Something...
<div>
with HIGHLIGHTEDTXT, you can type any things and the autocomplete dropdown will be shown.
P.S.
The autocomplete dropdown will not appear if the settings is set to TRUE when a text is highlighted.

Is there a way to disable selection highlighting in VS Code?

Is there a way to disable this multi selecting in VS Code?
There are 3 settings you can configure to disable this.
1. Selection Highlight
"editor.selectionHighlight": false,
When you selected "open" (as in drag your cursor around the word), it also highlights all the "open"'s in the same file. You can disable this behavior from the settings UI or from the JSON file.
2. Occurences Highlight
"editor.occurrencesHighlight": false
This is supposed to prevent selecting all occurrences of a word when you click on it (i.e. when you click on "open", it should not highlight all the other "open"'s).
But, it can be a bit unreliable. It depends on the language and whether you have language-specific extensions installed that does not override it. See the discussion on it here: https://github.com/Microsoft/vscode/issues/5351
3. Selection Highlight Background
This last way is a bit of brute-force solution. You can change the color of the selection highlight to be transparent. (Technically, it would still be highlighted but you just won't see it.)
"workbench.colorCustomizations": {
"editor.selectionHighlightBackground": "#00000000",
}

How can I hide indent guides in Visual Studio Code?

How can I hide the following lines to get a cleaner code view?
Like this in the official documentation:
How can I do that or find settings in the documentation?
Press Ctrl + Shift + p, type settings and select Preferences: Open Settings (JSON) to open User Settings, and add this:
// Controls whether the editor should render indent guides
"editor.renderIndentGuides": false,
This will disable the indent guides.
See the documentation for User Settings.
Edit: as on 30th May, 2022, this setting is called
"editor.guides.indentation": false,
I tried the previous answers, but it would not let me, as it said the file was read-only, so the solution I found was below:
Click on menu File → Preferences → Settings.
In the search box, type "render indent guides" (without the "")
Untick the box which says "Controls whether the editor should render indent guides".
This removes the indent guides.
Here's a way to hide the indent lines but keep the active line indicator.
Add this to settings.json.
"workbench.colorCustomizations": {
"editorIndentGuide.background": "#00000000" // hide via 100% transparency.
}
Only the active indent block will be visible.
To control the color of the active line, add...
"editorIndentGuide.activeBackground": "#444444b9" // Grey with some transparency.
Method-1 (using settings.json)
"editor.renderIndentGuides": false, is now deprecated in vs code.
Use "editor.guides.indentation": false instead.
Method-2 (using settings UI)
Goto settings > search editor.guides.indentation > Remove 'tip' mark for guides indentation.
SOLVED:
"editor.renderIndentGuides": false
Go to
Menu File → Preferences → Settings
And search for "editor.folding". Set it to
"editor.folding": false
This will disable the lines and the folding function.
Since you want to disable the render indent guides,
From the documentation
"editor.renderIndentGuides": false,
This will disable the indent guides.