syntax-highlighting

Can I merge Syntax coloring and Folding? OR Projection colored from master document info

让人想犯罪 __ 提交于 2019-12-25 04:37:21
问题 Example. I have an XML document: <document> <region type="type1">text of region1 </region> some simple text <region type="type2">text of region2 </region> And I want it to be presented as text of region1 some simple text text of region2 The basic Eclipse coloring works independent from folding, as I know. But I need text to be colored depending on the xml info. Or maybe I need something other, than folding? It's probably easier to just manipulate StyledText, but I need other Eclipse Editor

What's a good regular expression for comment Syntax Highlighting?

南笙酒味 提交于 2019-12-25 02:01:55
问题 Say I have this text: word1 word2 " word3 //" word4 I need write a regexp for comments. My solution now is ((\/\/).*(\n)) , which results in regexp for text in "" next ((\").*(\")) 回答1: It's my solution. I know it can be better. I know about Back Reference but i don't have experience with it. NSRegularExpression *exp = [NSRegularExpression regularExpressionWithPattern:@"((@\"|\").*?(\"))" options:NSRegularExpressionDotMatchesLineSeparators error:nil]; NSArray *textArr = [exp matchesInString

Have Syntax Highlighting in Markdown for Maven Site (Fluido)

天涯浪子 提交于 2019-12-25 02:00:55
问题 I have tried the following in my Maven project: Add a markdown file content.md with content ```java int a = 4; ``` in src/main/site/markdown . Write a site.xml with content <?xml version="1.0" encoding="ISO-8859-1"?> <project> <skin> <groupId>org.apache.maven.skins</groupId> <artifactId>maven-fluido-skin</artifactId> <version>1.7</version> </skin> <body> <menu name="Dokumentation"> <item name="Benutzerhandbuch" href="content.html" /> </menu> <menu ref="reports" /> </body> </project> Write a

Eclipse Plugin Development: How to highlight syntax in texteditor?

房东的猫 提交于 2019-12-24 21:42:20
问题 Given a java method name, i want to highlight it in the TextEditor. I have reference to the texteditor in ITextEditor. 回答1: You can create an IMarker object on a file which the Java editor will show. IFile file = ... file to mark IMarker marker = file.createMarker(IMarker.TASK); marker.setAttribute(IMarker.CHAR_START, start); marker.setAttribute(IMarker.CHAR_END, end); I have used a task marker in this example, but you can use the org.eclipse.core.resources.markers extension point to define

Gedit syntax-highlighting with gtksourceview for backreferencing sub-patterns?

十年热恋 提交于 2019-12-24 10:41:29
问题 The following will highlight "timeout" on the second line but will not highlight it ever again. Does gtksourceview support some sort of backreference on the "sub-pattern" that will match all instances throughout the file ? gtksourceview website manual /usr/share/gtksourceview-2.0/language-specs/c.lang <context id="struct" style-ref="struct"> <match>\bstruct\b\s\w+\s(\w+)</match> <include> <context sub-pattern="1" style-ref="structname"/> </include> </context> int ns; struct timeval timeout;

PyCharm: highlighting for custom filetype

眉间皱痕 提交于 2019-12-24 10:23:11
问题 In PyCharm, is it possible to define custom rules for syntax highlighting for files, which combine syntax from two different languages? A bit contrived example: following file should be treated as HTML, except for text in script tags, which should be treated as Python code. <html> <p></p> <script type="text/python"> v = "something" </script> <br /> <script type="text/python"> print v </python> </html> Bonus points for getting code completion to work as well. Note that "IntelliLang" extension

Proper tag highlighting in Vim?

我怕爱的太早我们不能终老 提交于 2019-12-24 09:33:20
问题 Just getting into Vim, but can't figure out why it's not highlighting these HTML tags properly. Shouldn't the closing body and html tags be bold and red? See pic. 回答1: Most colorschemes don't go very far beyond the generic highlight groups like Keyword or String . My favorite colorscheme is Sorcerer but I had to customize it like that : hi htmlTag guifg=#90b0d1 gui=NONE hi htmlSpecialTagName guifg=#90b0d1 gui=NONE hi htmlTagName guifg=#90b0d1 gui=NONE hi htmlEndTag guifg=#90b0d1 gui=NONE to

PhpStorm - wrong syntax highlighting with Blade

。_饼干妹妹 提交于 2019-12-24 08:58:19
问题 When I create a Blade template in PhpStorm, for example login.blade.php , syntax highlighting works correctly. But when I name it layout.blade.php , it doesn't. Why? How can I fix it? 回答1: Settings (Preferences on Mac) | Editor | File Types Text files Find and get rid of unwanted pattern (most likely will something be similar to layout.blade or alike. 来源: https://stackoverflow.com/questions/30909095/phpstorm-wrong-syntax-highlighting-with-blade

Eclipse: Subclipse “Edit Conflicts”

…衆ロ難τιáo~ 提交于 2019-12-24 06:37:38
问题 I have found that when using Subclipse to edit conflicts, all my syntax color settings are preserved except for the background color, which is reset to the standard white. Using my particular color scheme makes it almost impossible to read any of the text when stuck with a white background. Is there anywhere I can change this default background color? There doesn't seem to be any way to do this from the preferences window, but perhaps there is a config file somewhere I could edit? Any help

How to enable the SyntaxHighlight extension after installed?

我们两清 提交于 2019-12-24 06:24:10
问题 I have a fresh Mediawiki (v1.33) installed into fresh UBUNTU 18 LTS... The ''SyntaxHighlight'' extension is not working , the effect is like a code into <pre> tags. At mediawiki.org/list there are no clues. I used the syntax_highlighting checkbox during Mediawiki installation, and I can see it at Especial:Version page as "SyntaxHighlight 2.0", so, it is installed... But is not working. NOTES AND TESTS Notes. It is a corporative Wiki, no way to offer public URL... But it is a fresh, standard