i am having problem in my vsCode like when i write .container its is not giving me any suggestion for making a class conainer with div element - visual-studio-code

What should i do for that i, think there must be any option that i have to turn it, please help me to get out of this....Here you can see
Please Help me to resolve this problem
in my laptop when i installed vs code it works perfectly, but when i installed vscode in my desktop it is not giving me any suggestion to auto complete the tag
like when i write .container then it not giving any suggestion that i can click on it and it will change .container to

You need to modify your setting to get this.
Go to setting (Ctrl + , ) search for "emmet.triggerExpansionOnTab" then select the checkbox.
Now you when you type .container and hit Tab button and you get the results.
You can follow this link for more details: https://code.visualstudio.com/docs/editor/emmet#_using-tab-for-emmet-expansions

Go to VS Code setting type emmet in search
Locate the include language section. Click Add item to enter
item: javascript value: javascriptreact

I also had similar issue and solved using following steps.
Need to change the settings first
for that press Ctrl + , in your keyboard
Then you will get settings window like this image.
Search emmet.triggerExpansionOnTab as shown in image
Then enable by adding tick there
Go to vs code and try it out. ( Plz make sure to press Tab after typing like .example-class-name)

Related

VSCODE + Dart/Flutter: Double Autocomplete in conflict

i use visual studio code to create my flutter app, but since 1 month ago, i detected as if the editor have a double autocomplete.
When i write for example: "Container" i have the autocomplete while i'm writing, but if i press Enter it won't add the brackets at the end (before, it did!)
And, if i write: "child" i have the autocomplete while i'm writing, but if i press Enter, the cursor will be with a selection, and there is no autocomplete until i click in somewhere to remove the auto-selection, or i write the command completely without autocomplete.
It's like if there were a double autocomplete in conflict, that select the words after i press enter.
Autocomplete working:
Strange auto-selection and then no-autocomplete:
Furthermore, if i write "setState" and press Enter to autocomplete the function, i get the whole function selected and tabbed of 4 tabulation on the right. Same for initState.
I tried to disable every extension and restart, but i had same problem.
I'm so slow now to write flutter code, because i have to remember every CamelCase word and property and write them in every single char, or click in somewhere to make autocomplete works.
Fixed!
In setting i had to disable LSP.
"dart.previewLsp": false
I've the same issue, after some research I found this:
https://github.com/Dart-Code/Dart-Code/issues/2823#issuecomment-725630953
I'm not sure this is the right way because I didn't have try yet but the problem on GitHub issues seams the same you describe, apparently this solution works with LSP enabled

CSS Files Opening Up as Plain Text in VS Code

For some reason, whenever I create a new file and give it a css extension, the language mode is set to plain text. That is not the usual behavior and I don't know why it is acting that way.
Does anyone know how to fix that?
Thanks.
Click to the language at the right bottom bar of VSCode
Select Configure File Association for '.css'
Find CSS and select it.
You could run into problem cannot finding CSS in the last step I mentioned above, then here might be the fix for it btw:
Press Ctrl + , to open the Settings window.
Click Open Settings (JSON)
Find a line where there is
"files.associations": {
"*.css": "Plain Text"
}
and delete it, make sure the json file still in a correct format after deleting (no missing or extra comma ,).

How do I select all text in vistual studio code?

In visual studio code (1.29.1) ctrl+a doesn't do anything for me. I checked keyboard shortcuts and it's mapped to a few select all actions (editor.action.selectAll, etc.) but when I'm in a file and press it nothing happens. How do I select all text in the current file in visual studio code?
Thanks for the comments, it make me realize it must be an environmental issue. Turns out if you have any mapping starting with a key combination that will lock that mapping to the key combo and you can't use it for anything else.
To make save all ctrl+shift+s I had to re-map save as and I mapped it to ctrl+a+s, so everytime I hit ctrl+a it just waiting for second key. In the status bar at the bottom of my editor it said something like "Ctrl+a detected, waiting for second keystroke", which means Ctrl+a won't work on its own. I re-mapped Save As to some unused key combo and it fixed select all.
This question was luckily answered on another thread
I'll post the OG answer here, nonetheless.
Most new comers to VS-Code could resolve this issue with the 2nd method provided by the OG answer:
Goto File > Preferences > Keyboard Shortcuts
in the search bar type this Select All
There's should a couple of results, you'll obviously want the "Select All" result
right click on his line and click on Change When Expression
a textbox would be highlight for you to fill in text. type editorFocus
press enter and done!
The OG answer provides image if you need to confirm that you're doing it right.
side-note: This issue bugged for more than 3 years and is the main reason my I used VS-Community over VS-Code.
So it's nice to finally be able to work normally in this very robust customizable IDE text-editor.

Getting rid of underline (link)

How do I get rid of this underline? When I hover over it, it thinks it's a link and that I can cmd + click it to open it in browser. However, it's obstructing the view of actual underlines.
I'm specifically using Go's templating engine and vscode's basic HTML syntax because it's not supported.
I think I found a solution for your problem.
Add this code to your User Settings;
"editor.links": false
If you want to keep links clickable and just get rid of the underlines, I found a way:
open resources\app\out\vs\workbench\workbench.desktop.main.css
search for .monaco-editor .detected-link, and delete it.
Reopen VSCode, it will show some warning. Allow it and it's done.
After every update, you'll need to edit this file again.

Is there a way to highlight code in NetBeans manually?

When I am figuring out someone's code in NetBeans, it occurred to me I could use a feature to mark code as 'understood', or 'suspicious', etc. while going through it. Is there any way to manually highlight or format code in NetBeans, the way it is done in Word? Some plugin maybe?
The alternative, i guess, is adding short comments everywhere, which is often not too convenient.
The Netbeans Collab plugin was pretty useful to share code and color them when you are sharing it through an XMPP server or discussing the code with someone.
You could use that to talk to yourself and color parts that you want to comment on.
You could surround sections of code with an editor-fold. To quickly do this:
Select the section of code you want surrounded
Press Alt + Enter
Select Surround with // <editor-fold defaultstate="collapsed" desc="comment">... from the hints popup
Enter your tag ie. "understood"
Press enter
This will give you a collapsible section of code that when collapsed will only show the tag that you've entered for the comment attribute.