syntax-highlighting

Sublime Text - C++ Highlight

大城市里の小女人 提交于 2019-12-17 15:51:53
问题 How can i make my class be highlighted as a normal primitive type like the int or double? See a exemple: I want that when i declare the Test aloha; Test be highlighted of the same way that int a . 回答1: The syntax highlighting is controlled by the tmLanguage file. In ST3 these are held in .cache files. So follow these steps. Open Tools -> Command Pallet and using Package Manager install PackageResourceViewer In the Command Pallet select PackageResourceViewer: Open Resource In the presented

Embedded syntax highligting in Vim

夙愿已清 提交于 2019-12-17 15:31:25
问题 I have a custom XML file format which can contain blocks of code within certain tags. For example: <Root> <Sql> select * from foo </Sql> <MoreJunk> ... </MoreJunk> <Python><![CDATA[ def Bar(*args): return False ]]></Python> </Root> How can I get Vim to use SQL syntax highlighting for the text inside <Sql> tags and use Python higlighting for text inside <Python> tags? I know Vim can already do this because it correctly highlights Javascript inside HTML files. I tried inspecting the HTML syntax

Syntax highlighting markdown code blocks in Jekyll (without using liquid tags)

别说谁变了你拦得住时间么 提交于 2019-12-17 15:27:11
问题 It seems like syntax highlighting in Jekyll is limited to using liquid tags and pygments like so: {% highlight bash %} cd ~ {% endhighlight %} But I've imported my existing blog from wordpress and it was written in markdown (using markdown code blocks) and I don't want to have to go through each post and fix the code blocks. Also, I want to keep my posts in pure markdown format in case I ever need to switch blogging platforms again. I switched my Jekyll parser to redcarpet with the hope that

How can I create a custom Eclipse Syntax Highlighter

我与影子孤独终老i 提交于 2019-12-17 07:20:06
问题 I've been developing a compiler for a new language. I thought it would be neat to be able to demonstrate its development in a syntax aware environment. The language has quite a few custom keywords, and its structure is significantly different than common languages such as Java or C/C++. How can I develop a custom syntax highligher for Eclipse? I've seen some references to a few plugins, but the documentation is not thorough enough for my beginner's needs. I have a grammar/REs for my language,

Visual Studio 2015 - HTML - Angular Syntax Highlight

江枫思渺然 提交于 2019-12-14 01:06:31
问题 We use angular heavily in our html pages and currently attributes that start with ng- get a different fore color applied to content inside the attribute. This is also the case with values inside an angular expression {{expression}} . This makes reading larger HTML documents easier on the eye especially when working with the Angular parts. However as soon as you add the data- prefix to an angular tag like changing ng-if to data-ng-if the highlighting is lost/removed. So my question is how can

Hiding text with QSyntaxHighlighter

此生再无相见时 提交于 2019-12-14 00:58:10
问题 Problem: I want to implement a text editing widget for text with additional tags. I'd like some tags to be invisible in some cases so that they do not distract the user. Environment: I'm using PyQt and prefer to use QPlainTextWidget and QSyntaxHighlighter . Approach: With QSyntaxHighlighter I can set QTextCharFormat for the strings which match my requirement. QTextCharFormat has gives me all font properties like size, colors, etc. but: I haven't found a option to hide the text or reduce its

Python IDLE syntax coloring (highlighting) of print inconsistent?

荒凉一梦 提交于 2019-12-13 22:25:02
问题 Is Python IDLE consistent regarding syntax coloring (highlighting) of print? I tested using IDLE 2.7.2. Sometimes it recognizes as a keyword. Sometimes as built-in ( such as list() or tuple() ). Both of them are, IMHO, correct; so IDLE is inconsistent? Let me know your opinion. KW Added a screenshot 2012 04 01 18:27 KST (April fool's day but the shot is true.) Link to my screenshot How I made this: Second print will be built-in from the beginning. The last(=fourth) print is more tricky. First

error highlight in eclipse only partially works

无人久伴 提交于 2019-12-13 22:12:26
问题 If I write something like this in Eclipse UnexistentClass foo = new UnexistentClass(); foo.unexistenMethod(); first line is highlighted as an error (the class does not exists), but second line is not highlighted, even if I'm calling a method which does not exists on an object which belongs to a class which does not exists, too... Why is sthat? Thanks 回答1: I would assume that it's because Eclipse doesn't know anything about the class you're calling the method on. Only once it knows which class

How to I set the max height of a SyntaxHighlighter code block both website-wide and for a single block of code?

余生颓废 提交于 2019-12-13 17:32:45
问题 I'd like to both locally and globally set the max height of SyntaxHighlighter code blocks. Here's an example of a global implementation that sort of works: Once you get SyntaxHighlighter implemented and working per these instructions here, just before </head> in your Blogger template, add: <style type="text/css"> .syntaxhighlighter { height: 1024px; overflow-y: auto !important; overflow-x: auto !important;} </style> (Source). This will limit code size to 1024 vertical pixels, then add a

Enabling Liquid templating syntax highlight in webStorm/phpStorm

旧时模样 提交于 2019-12-13 11:32:27
问题 I wonder if someone managed to enable the Liquid templating engine syntax highlighting in WebStorm IDE, I work a lot on Shopify stores and really like using Webstorm for that purpose. Did anyone managed to get this working? I found some resources regarding this issue on JetBrain's forum though it didn't quite got me anywhere, there is one dude who suggested using 'tmBundle' and that might work if you do some dark magic. The thread is: RUBY-7210 and the official plugin request: JetBrain's