IntelliSense / Suggestions: Fulltext search instead of word-based search - visual-studio-code

Intellisense is not considering all characters and therefore is not showing all functions/vars/tags/.../ that are available. Let me give you two gif examples.
1st example, HTML, click me: <title> is suggested when the word title was typed, but it is not suggested when the words itle or <itle were typed.
In JS it is also not what I would expect.
2nd example, JS, click me: when the word timeout is typed, it suggests the function setTimeout. But there is another function settimeout, which actually is a snippet, so it is more valuable for me than the suggested one. settimeout even has a short description right next to it Set Timeout Function. Would be nice to search that description too.
It seems to be that VS Code is looking for words instead of all chars when suggesting functions/vars/tags/.../. I found 2 settings to play with, but they didn't change anything.
"editor.wordBasedSuggestions": false,
"editor.suggest.showWords": false
Is there a way to turn the suggestion feature the way I want to have it?

Related

VSCode built-in snippets fail to to show when consecutive letters are typed

If I type one letter of the trigger/prefix, the snippet suggestion works to show the built-in snippets from extensions. But, once I type the next letter in the trigger/prefix...the built-in snippet from the extension is gone. Meaning, it is no longer found anywhere in the dropdown list (you won't find it by scrolling). .
Here is a snapshot confirming that the trigger/prefix is removed from the list
I found that with some built-in snippets from extensions, if I type out the entire word, it will reappear. For example, if I want: 'trycatch', it will be populated in the list when I type 't', disappear when I have typed 'tr', but then reappear when the entire trigger/prefix is typed.
How can i get a built-in snippet from an extension to show in snippet search when 2 or more letters of the trigger/prefix are typed? I am using version 1.75.0
I tried looking at the docs of VSCode, but it's too simple to help. I tried looking at my settings (keyword: snippets) and play around with any possibilities, but nothing seemed to fix it. Any google search comes up empty as well.

How to hide suggestions on known words in Visual Studio Code?

Suggestions are very useful, but sometimes they're annoying.
I want to hide suggestions when what I typed is a known word in the language or in the current document.
E.g.: Since I used the word elapsed in a document, every single else I typed after it selected elapsed. Very annoying. Since else is a known word, I want the suggestions disappear, so when I hit ENTER the final word is that what I typed. This is a case; there are a lot of cases.
Other editors hide suggestions on known words (e.g.: Kate).
Tuning "editor.quickSuggestionsDelay" doesn't help, because frequently I stop to think and suggestions will appear anyway.
"editor.acceptSuggestionOnEnter": false doesn't help too; I've tried it but I'm not productive using TAB instead of ENTER.
I also tried "editor.wordBasedSuggestions": false, but this is not what I want. It hides every known word, but I want to select known words if I didn't type one.
I would like an option like "editor.hideSuggestionsOnKnownWord": true, but I could not find nothing similar in vscode.
Is there an option or an extension to do that?

VS Code find-and-replace: is there a way to keep my previous find term when I type ctrl+h?

Currently, when I use ctrl+h with something highlighted, my find term is set equal to the highlighted text. Is there a way to stop that (and keep my find term the same as it was previously)?
Often I want to find-and-replace in VS Code, do something, highlight something, and then find-and-replace the same thing again. Is there a way to make it so that I don't have to retype my find term a second time?
I know there are some plugins that have this functionality; if you know of any that allow me to see both my find and replace terms at the same time, I would like to know.
Set this setting to false:
// Controls if we seed the search string in Find Widget from editor selection
"editor.find.seedSearchStringFromSelection": false,
Editor > Find: Seed Search String From Selection
Doing this will also affect your Find/Search in Files functionality.

IntelliSense autocomplete "on dot" choosing incorrect symbol

I'm editing a stand-alone JavaScript file in VSCode 1.19.2. I do not have a project set up, and no jsconfig.json to control it.
I enter the following code into an empty editor:
var scene = new THREE
Intellisense starts to kick in and gives an auto-complete list.
When I press "." (expecting my code to become THREE.), IntelliSense takes this as a sign that it gave me the right answer, and changes my code to:
var scene = new HTMLHRElement.
The full string "THREE" wasn't even in the list, but IntelliSense seems to be using some kooky regular expression to predict what the user actually tried to type--the letters are all there in the applied symbol, but they're all split up and in different cases.
For me, this is counter-intuitive (not to mention frustrating beyond words, because I type this string a lot), but everything I've found so far is people asking for this feature. So, I'm looking for a work-around for me.
Is there any way to turn off "complete on dot," or maybe a similar setting to force IntelliSense autocomplete only on tab? Also feel free to correct my terminology, in case that was preventing me from finding the correct answer.
JavaScript and TypeScript treat . as accepting the current suggestion by default. You can disable this by setting:
"editor.acceptSuggestionOnCommitCharacter": false
or, if you only want them disabled in js:
"[javascript]": {
"editor.acceptSuggestionOnCommitCharacter": false
}

CodeMirror highlighting on find

I want to recreate the find function in CodeMirror for highlight each occurrence like showed in this demo.
I have created an example using marks, but highlight only the first occurrence.
http://jsfiddle.net/oxmgm4sd/
Changing your if (cursor.findNext()) to while (cursor.findNext()) might already get you somewhere. It is more efficient (though also a little more complicated) to use an overlay instead, which is what the built-in search functionality does.