Anyone has any idea why in my scss document these two classes .age and .organisation have a red highlight to them? I have looked all over the place but can't figure out what the problem is. Below is a screenshot:
It seems GitLab marks them differently depending on what one uses two colons or one. This is for reference for what the difference is.
Related
Does anyone know the reason for the blue lines??
When I double the size variable, the blue underlines turn into red underlines.
It's a linter warning. Usually it tells you about the best practices that can improve your code quality.
In this case, it is asking you to use const keyword for those widgets while initialising. The exact rule for this warning can be found here: prefer_const_constructors.
You can check all the linter rules here
it just tells you if you do this your code would work better or would be more readable.
in this case, adding const to your Icon would make this widget not to rebuild completely from scratch and use data that have been stored in ram
I'm looking for a reference as to what each color of syntax highlighting in Visual Studio Code actually means. I'm currently using the dark default theme Dark+. I've gotten used to recognizing a few of the highlight colors and I get the gist of what I'm looking at, but I'm looking for a more detailed reference of what each color means.
I've searched for a while for this and can not find any reference guide or glossary/index listing the colors and meanings. Not sure if it matters, but I am solely writing in JavaScript.
Thank you in advance.
edit: I have included a screenshot of the type of syntax highlighting I am referring to.
The meaning of the syntax highlight colors comes in two parts:
How are the characters in the file organized into meaningful tokens?
How are those tokens assigned a particular color and font style?
Partitioning text to tokens
The first part is determined by a grammar description built in to VSCode. VSCode uses a system based on TextMate grammars. The grammars are defined in the VSCode sources (e.g., JavaScript.tmLanguage.json), but in that form have gone through a couple stages of postprocessing, making them nearly unreadable. There is no documentation of the intent of these grammar files. They tend to at least roughly follow the relevant language specification, but with plenty of ad-hoc deviations.
The most practical way to understand what tokens are defined is to use the "Developer: Inspect TM Scopes" tool available in the Command Palette (Ctrl+Shift+P). When you put your cursor on a token, it will show you the "scope labels" that describe that token. These labels are more or less human-readable.
Edit 2020-07-24: As of VSCode 1.47 (and possibly a little earlier) the command is called "Developer: Inspect Editor Tokens and Scopes".
Example:
Above, we can see that the return keyword is most specifically classified as keyword.control.flow.js. It is within a brace-enclosed code block (meta.block.js), within a function definition (meta.function.js), within Javascript source code (source.js).
That sequence of scope labels is the closest thing there is to a "meaning" for a token in VSCode.
Assigning colors to tokens
Next, there is the process of mapping that sequence of scope labels to a color and font style. That is done by the theme. In my case I am using Visual Studio Light, defined in the VSCode sources in light_vs.json. In the case of the return keyword, this is the applicable fragment:
{
"scope": "keyword.control",
"settings": {
"foreground": "#0000ff"
}
},
This says, basically, that anything with a scope label beginning with "keyword.control" shall have a blue color. But other fragments may override this one; the rules are somewhat complex. Why blue? It's an arbitrary aesthetic choice.
Why do function and NaN have the same color? The grammar assigns them different scope labels (storage.type.function.js versus constant.language.nan.js), but it just happens that the theme you are using (Dark+) assigns them the same color (as does mine). I find that an odd choice, but can only speculate about the reason.
Customizing the colors
You didn't ask, but an obvious follow-on question would be how to customize these colors, for example giving function and NaN different colors. See this answer.
The new structure guide lines in VS2017 are extremely confusing, as they are positioned in the middle of a character, instead of to the left. The biggest problem is that I don't know when my cursor is ALL the way to the left, as it seems to be when it is standing on the grid line, but it may off by one.
How can I change them to look more like Visual Code? I know how to enable and disable them but can't find any way to alter their looks.
No guide lines in VS2017: This does not help me much.
With guide lines in VS2017: This is awful, it looks like there is just 1 space between two guide lines, when in fact there are two!
Guide lines in Visual Code: Very helpful.
Finally found this plugin, which fixes the main off-by-one problem and works for VS2017. See below for a screenshot of the indent guides added by the plugin.
The plugin is customizable, such that you can get a solid line if preferred.
I've spent like an hour tying to find a way to fix this, but I just can't do it. Some lines/characters will show up a different color in Aptana (all semicolons, some tabs, and some whole). I just installed it today, so I don't know my way around the software very well.
Here's a picture to help you get the idea:
I would like get rid of the way some sections are lighter (the line saying some text is the line the caret's on, which is not the problem)
P.S. If this is the wrong place to ask this, I'm sorry, but I'm getting frustrated searching through Google and the Aptana preferences.
I too spent way too much time on this issue.
The answer by phazei is correct:
Aptana 3, php code background highlighting
But my main problem was I didn't know where to look. So to give some insight into how I found the answer:
It turns out you can see what markup the editor is using and how it classifies any block of text, by just right-clicking on the text you are interested in and pick Show in -> Properties.
I need to do a simple thing at first glance - add a bar with line numbers to CKEditor. The main idea is a writer can refer to a particular paragraph while discussing the text.
I have tried to find a plugin, tried to find an another WYSIWYG editor with line numbers but no success.
Does anybody know any solution for CKEditor or another one that already has line numbering?
Or the only I can do is to write it from scratch?
Thanks!
I implemented it from scratch. When it will be possible I'm going to improve it. There are some issues and limitations now.
Link to repository.
Instead you can use the Codemirror plugin as well to get the Line numbers which includes search and replace as well.