I have created a JavaScript 'user snippet' in the Visual Studio Code to make it slightly faster to call the console.log()
method (a line of code that I write very frequently).
"Console Log": {
"prefix": "log",
"body": [
"console.log($0);"
],
"description": "JavaScript Console.log()"
}
The user snippet works, but when I type log
into the editor, my custom snippet is at the bottom of the list.
Is there any way I can make this the first suggestion, rather than the last?
With a code file open in the editor, choose Snippets > Insert Snippet from the right-click menu, then My Code Snippets. You should see a snippet named Square Root. Double-click it. The snippet code is inserted in the code file.
Depending on your plaform, your user snippets file is located here: Windows %APPDATA%\Code\User\snippets\(language).
Once you've opened Visual Studio Code, just press alt + space and the system menu will appear, then you just have to select the Always on top option.
Move Code Alt+Up/Down If you put the cursor on a line of code and use the Alt+Up Arrow keys, the line of code you've selected moves up. If you use the Alt+Down Arrow keys, the line of code selected moves down.
Try setting:
"editor.snippetSuggestions": "top"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With