syntax-highlighting

Visual Studio - Markup syntax highlighting inside script[type:txt/html]

风格不统一 提交于 2019-12-08 16:55:23
问题 Does anyone know how or if its possible for Visual Studio 2008 to highlight the html syntax inside a script block of type "text/html" just like any other markup on an aspx/html page. I'm using the script block to house my templates for client-side templating. 回答1: Two ideas come to mind, assuming the page itself is an ASP.NET page (and not a plain HTML page) : create a custom control which emits the script tag and end-tag. By using a custom control, you'll fool the IDE into not knowing about

How to get Webstorm 11 to recognize ES2015 javascript in HTML script tags

耗尽温柔 提交于 2019-12-08 15:14:52
问题 I've been having trouble getting WebStorm 11 to recognize/highlight/parse ES6/ES2015 javascript when it's inside script tags in regular HTML. Can't find a setting that seems to apply to this. Thanks in advance for your time. For example, the following js is inside a script tag. You'll notice that WebStorm thinks that a whole bunch of things are broken with it, but it executes just fine. 回答1: Using <script type="text/ecmascript-6"> rather than <script type="text/javascript"> should help you.

How does a progn form in font-lock-keywords work?

怎甘沉沦 提交于 2019-12-08 13:34:36
问题 Following code will visually replace "hello world" with "HW" by passing a progn form to font lock keywords. (font-lock-add-keywords nil '(("\\(hello world\\)" (0 (progn (put-text-property (match-beginning 1) (match-end 1) 'display "HW") nil))))) I've look into C-h v font-lock-keywords to see if this is a documented feature of font lock. The hello world element seemed to be of this form: (MATCHER HIGHLIGHT ...) which would mean that (0 ...) is HIGHLIGHT and the doc says HIGHLIGHT should be

How to set syntax highlighting for Dart variable in Visual Studio Code

时光毁灭记忆、已成空白 提交于 2019-12-08 11:15:11
问题 I am using Visual Studio Code for coding Dart with Flutter. I installed Dart and Flutter plugins as well as the Material theme from Matta Astorino. The problem is I can't specifically set the syntax highlight of my variables with Dart language using the Material Theme Ocean High Contrast color theme. The settings i used: "editor.tokenColorCustomizations": { "[Material Theme Ocean High Contrast]": { "comments": "#229977", "variables": "#ffffff" } }, -Dart From the picture above, the comments

How to set manualy color of params[] and redirect_to in Vim?

最后都变了- 提交于 2019-12-08 10:52:09
问题 This is my colorscheme -> https://gist.github.com/1973544 But in example screenshot of sexy-railscasts: https://github.com/oguzbilgic/sexy-railscasts-theme params[] and redirect_to are colored. How to achieve this? EDIT: Problem is with filetypes. Releated -> Ultisnips break rails syntax. How to setup correctly? 回答1: This colorscheme is, as specified in its header, "A GUI Only port of the RailsCasts TextMate theme to Vim.". GUI colorschemes (for GVim or MacVim) can make use of thousands of

Syntax highlighting Javascript in LyX, insert child -> program listing

旧时模样 提交于 2019-12-08 09:43:36
问题 Im writing my masters thesis, which includes alotta javascript. Im including it as a child file, as a program listing with the following options: breaklines=true captionpos=b frame=tb language=Python There is no javascript language/listing file, which is why Im trying python. Also tried Java, but neither did much good. Is there any way to get some js syntax highlighting here? It really is alot of code, so its not very easy to read when its all black. Thanks 回答1: There is no JavaScript

How to highlight calls to object methods and user-created functions? (SublimeText, python)

こ雲淡風輕ζ 提交于 2019-12-08 06:46:19
问题 I tried using both Python3/PythonImproved .tmLanguage syntaxes, but neither does this for some reason. Are those actually supposed to be the same color as variables in most editors? Here's a screenshot of some random function: And here's how I want it to look like: To sum it up I just want everything called with parentheses like function() or an object.method() to be highlighted. 回答1: I'm the author of Python Improved. Sublime's default Monokai theme lacks the ability to highlight many of the

Code Highlighting for Joomla

岁酱吖の 提交于 2019-12-08 06:20:54
问题 I need syntax highlighting of source code from various languages (PHP, C#, VB, etc) within articles I have in Joomla. I have tried enabling the Geshi plugin, updating the language files and putting the code into my Joomla article - however I can't seem to get it to work. I have also tried CodeCitation from JED but again, the problem seems to be the same - I don't know how to tell Joomla to process it as code. I placed {codecitation} and {/codecitation} around my code (as well as including the

Eclipse CDT parser support for C++11?

爷,独闯天下 提交于 2019-12-08 01:44:47
问题 I'm using Eclipse 3.7.2 with CDT 8.0.2 on Linux. How can I configure the CDT to recognize c++11 syntax, specifically override ? Currently the parser flags a bogus error on the line indicated. The build completes without error since I include -std=c++11 in my compiler command lines. class foo { public: foo(){} virtual ~foo(){} virtual void func(){} }; class bar : public foo { public: bar(){} virtual ~bar(){} virtual void func() override {} // <--- parser incorrectly flags syntax error }; int

Highliting text in html page having only xPath, anchorOffset and focusOffset

我的未来我决定 提交于 2019-12-07 22:24:08
问题 I'm trying to hightlight some part of a text in a html page having only the xPath (or css path) of the selected area, an anchorOffset and a focusOffset. I know how to manage this using the selection() method from user input, but i'm having serious difficulties trying to reproduce the same mechanism in an automathic way without the selection but only with these infos Example: (imagine I have many others like this) Xpath : heyThere[1] anchorOffset : 3 focusOffset : 45 My goal is something like