I use Vs code for my coding.However I am getting weird lines in my code. Happens only when I am editing a .c file and not with .py file. Does anyone know a quick fix for this? Thanks.
Related
In Studio Visual Code I'm using SASS and when working on my .scss file if I add something like:
grid-template-columns: repeat(3, 1fr);
for a section tag and save - the corresponding css file is changed to the following:
-ms-grid-columns: (1fr)[3];
grid-template-columns: repeat(3, 1fr);
I would like to know why it gets changed with the extra line of code inserted before what I typed.
Looking elsewhere from examples it seems on css alone my syntax is correct, otherwise I would have assumed Visual Studio is trying to do some code correction. I have a hunch but don't know what it's about that the prefix -ms has something to do about it and is the clue I can't figure out why or how to stop doing this.
The odd thing is if I type what I want directly in the css file it gets displayed with no errors in VS,
but VS's own code addition to my css file shows up as errors - like it didn't change it properly, whatever it's trying to do.
Anyone able to shine some light on this is appreciated. Thanks.
In VSCode when I indent some commands or variables correctly, they got faded. Can anyone tell me why this happens (is it really connected with indentation?) and how I can get rid of this annoying issue?
Faded lines in the case of correct indentation but not always!
In the wrong indentation, everything seems correct
Output which is correct
I have opened an issue in Pylance and here is the discussion, cause, and solution:
https://github.com/microsoft/pylance-release/issues/3240
(Unreasonable faded lines #3240)
another useful link could be:
https://github.com/microsoft/pylance-release/issues/3195
Normally, VS Code displays abc suggestions like the one below in the editor:
However, the VS Code extension that I have created does not display these word suggestions for my files, which have a different different file extension (e.g. myFile.mf). In the .vscode directory of my extension, I opened settings.json, and added the line below:
{
"editor.wordBasedSuggestions": true
}
This change was not successful, so I tried doing what was suggested in the answers of this Stack Overflow question, but to no avail. I have also tried closing and reopening VS Code after making the changes, but the abc suggestions still won't appear. What should I do?
I was trying to copy from GitHub the following file: https://github.com/vineodd/PIMSim/blob/master/GEM5Simulation/gem5/configs/common/MemConfig.py
I have tried using git clone, downloading directly from the website and also copying and pasting. I have done this in four different text editors: sublime text, atom, textWrangler and Spyder. In Spyder it gives me the following message:
Contains mixed end-of-line characters.
Every time, when I open the file the indentation is wrong in a lot of places, what is a problem because it is a Python file. You can see it for example in the line 280. In GitHub all appears to be fine. Can I do something to fix this? Has this happened to anyone before? Any help would be appreciated. Thanks in advance!
I have already figured it out what was happening here. The file was combining spaces and tabs for indentation. GitHub displays tabs as 8 columns (spaces), but in the text editors it was equivalent to 4 columns. So to fix it I opened a new file where I just wrote a tab. I copied it and used it to replace all tabs for 8 columns.
If you're using intellij/Android studio, you can 'Paste as Plain Text'
I am trying to use Visual studio code to edit my Matlab .m file. After installation and setting of Matlab extension, I can write my m file now. The variables color markers are correct. But I found a problem about the "hints" or "prompts" of my code. I don't know the exact term of it. I just describe it in an example.
When I write some problematic code in Matlab editor, there would be a wavy red line under there. When my mouse cursor stay there, a message pops up, like invalid syntax at the end of the line. In the Vscode editor, there is wavy line, too. But it can't show the content of the prompts but only some rhombus symbols. There is a button Peek Problem under it. Sorry for lacking pictures here. I am trying to describe the problem in details.
I may need to change the settings but don't know how. Do I need more extensions? Any suggestions would be appreciate.
Following prompt of #nekomatic,
add "matlab.linterEncoding" : "gb2312" to the setting.json.