Just wondering, if the syntax error gutter can be customized? Also is it possible to highlight texts which has syntax error?
For example below I am trying to check value of myString against string a "chetan" but without quotes. Now this is a syntax error. Currently we display the error in gutter prior to line number. But is it possible to customize the ace editor provide inline highlight and change the color?
if myString==chetan:
//do something
endif
You can add underline similar to the way cloud9 and zed do (see https://github.com/zedapp/zed/commit/59ae66c545db2ad92dc5efc1a069edd16960ebdd) or modify highlighter tokens see https://groups.google.com/d/msg/ace-discuss/_PRUJ_HemNo/wvDf9FqwzhMJ
I discovered that the line that has an error does not have spans, so I did the following:
if( editor.getValue() != "" && $('.ace_text-layer.ace_line:not(:has(span))')){
$('.ace_line:not(:has(span))').css("background","#FCBEA5")
}else {
$('.ace_line:not(:has(span))').css("background","#000000")
}
There are a few issues with this, such as it highlighting the current line.
To customize the gutter you can play around its .ace_gutter properties.
Now suppose if you want to change the width of the gutter,
.ace_gutter > .ace_layer {
width: 20px !important;
}
This will help you in changing the width of the gutter by overriding the present gutter width. Similarly, you can edit other properties too.
Related
I installed this new theme called Panda Theme. Everything looks good except for the two extra bold lines under the wavy error and warning underline. This happens to all languages.
Does anyone know where to change this back to the default, but still keep the theme?
example image of error underline, and the default that I want it to be
Ah yes these two lines editorError.border and editorWarning.border was in charge of the extra lines. Putting these into setting.json helped. Thanks #rioV8 for the suggestion.
"workbench.colorCustomizations": {
"editorError.border": "#00000000",
"editorWarning.border": "#00000000",
}
While using ACE editor I've observed that a mysterious line is being displayed at the center of the editor. How do i fix this?
That line is called as Print Margin, include
editor.setShowPrintMargin(false);
in your code.
It is not a mysterious line but a print margin - simple line at the specified column, to help seeing when lines become too long.
To disable it we can also use,
editor.setOption("showPrintMargin", false)
I've just started using SASS with Sublime Text 2 and it's great. I'm using the SCSS syntax.
However, I've been using Emmet and it does not seem to work with SCSS well when using tab (for me). With Emmet, I usually write: float and press tab, it converts it to float;. This is only after I made the following change to the preferences, for SCSS:
{
"preferences": {
"sass.propertyEnd": ";"
}
}
However, I also commonly write a class or element name: body, press tab and it creates body { }, with the cursor within the brackets. This seems to have stopped working, and since I've changed the preferences, it just ends the property with `;.
Is there a way to get this autocomplete function back, with element names and attributes?
I'm not clear on why you wanted to set propertyEnd initially, but I can highly recommend the even shorter expansions Emmet has to offer:
Ex: Type fl followed by tab and you should get float: left; with the 'left' already highlighted for you to change. fr also expands to float: right;.
I'm not sure if these are standard with Emmet or if they come with the SCSS Package for Sublime, but they save me a lot of time. If you get used to them it's even quicker then typing out a full float before hitting tab.
Can anyone suggest:
Why does it higlight like this? I don't seem to do anything to activate it:
How to disable it?
This is old, but I ran into the same problem and just figured out an easy fix.
From the file menu: Language > N > Normal Text
I'm not sure if this is the same issue as mine, but I wanted to keep the language setting enabled but remove the highlighting.
I did this by going to Settings --> Preferences --> Highlghting
Removed the Enable check mark for Highlight Matching Tags.
1) Go to settings -> Style Configurator.
2) Select the language that Notepad++ has chosen, usually based on filename extension. You can also change this manually under the Language menu setting.
3) Go through the Styles until you find the style that applied the highlighting. You can tell because the Background colour will match the highlighted color.
4) Change Background colour to white.
I do not have an answer for your first question
For your second question do the following steps
Inside Notepad++ press ctrl A( select all)
Right click for context menu.
select Remove style and click on Clear all Styles
This will clear all the highlights.
FYI. You may also see this sort of behavior when using a vertical edge in background mode. Switching to line mode will eliminate the highlighting of lines that run over the set character count for the vertical edge.
I wish to disable all code formatting in Visual Studio 2010, with the intention of selectively switching options back on as I see fit.
Currently I have a specific problem that refuses to go away; When I add the final brace in the code block below, Visual Studio 2010 reformats the code for the entire switch statement above that point, placing each line against the margin (removes leading whitespace on each line). I've switched off every setting in Tools/Options/C#/Formatting to no avail. Is there an overriding 'Disable all formatting' option? Thanks.
switch(fractionalDigits)
{
case 0:
if(significand > 107374u)
{
if(truncateRange)
{
significand = 1073741823u;
}
else
{
result = FixedPointDecimal.Null;
return false;
}
}
else
{
UPDATE: The specific problem above was caused by additional formatting options being added by the Power Tools. The additional formatting options seem to interact with the built in logic an odd way.
Tools > Options > Text Editor > C# > Formatting > Indentation > Indent case labels
You could try the following:
Create a color theme with nearly no color. So you could readjust each code elements color step by step.
You can use the following tool to generate a no color theme:
Theme generator
Set the constrast to the left and main and foreground color to white.