What are these red blanks in vs code? - visual-studio-code

I was working on vue js in vs code, when i pressed some key this problem is happend,how to return to previous state?

You are likely searching for a space in either the file or workspace search. Just clear them to make it go away.

Related

VS Code automatic indentation

I have a problem with automatic indentation in VS Code. If you pay attention to the gif below, you will see that the editor only moves a tab forward for the first time, but the second time it should automatically detect that a tab moves forward, but this is not the case. Many editors do not have this problem, but it has really become a problem for me. Also, for example, I do not want to press a shortcut key to solve this problem, I expect the editor to handle.
I found theanswer. Just disable trimAutoWhitespace in VS Code settings.

Visual Studio Code Save All button issue

Visual Studio Code Save All button is always enabled even without any file changes. How can we solve this issue? Ideally it should be grayed Out if no file changes are there in the workspace.
It's an intentional feature, just in case someone is not sure if they saved their files, VS Code will always show it to prevent closing without saving (besides the exit prompt).
Now, if for some reason they decided to change this, it would we worse, as people are used to the always blue button.

Visual Studio Code missing dirty file indicator and highlight tabs doesn't work

When I have a dirty file in VS Code, I do not get the bullet in the file tab nor do I get the highlight bar above the tab. I turned on Highlight Modified Tabs in the settings with no effect. I also tried changing themes in case it was a color issue. I don't have any extensions that would interfere with these settings.
Has anyone experienced this? Do I need to completely uninstall VS Code?
I had the same issue and just solved it with this answer:
That was a hint. I realized what was the problem. Kind of weird. I had
modified the settings.json file manually, setting auto save to off,
but I realized that under the File menu at the top, Auto Save was
marked as active. My files were not auto saving, but VS detected as if
it were active. Unchecking Auto Save in the File menu did the trick.
https://github.com/Microsoft/vscode/issues/23950
I clicked File > [unchecked] Auto Save
This fixed it for me.

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.

Using vscode, i am driven crazy by annoying pop hint every time when i hit Space key, How to solve this problem?

i am driven crazy by annoying pop hint every time when I hit Space key. As shown below:
Now, how to find out which extension or pop snippet hint is causing the issue when I hit space key and which one to disable it ?
There are two ways to solve this issue.
Method 1:
In VSCODE. click File > preferences > keyboard shortcuts and search for space you could see space might be wrongly assigned to some intelli sense. Click on that particular keyboard shortcut. Double click the stroke and change the shortcut.
Method 2:
Very expensive way.
Disable all extensions first and try the space keystroke then try enabling one by one. You will definitely find the culprit.
Hope it helps
I solved it eventually by disable all snippet extend one bye one, then the latest extensions, found out the cause is https://github.com/bauhausr/antd-intellisense extension.
It drives me crazy too. I just turned off Editor: Suggest On Trigger Characters and it seems to be working for me!