syntax-highlighting

JSON Javascript highlighting in Visual Studio 2010

…衆ロ難τιáo~ 提交于 2019-11-30 22:55:36
问题 Does anybody know how to get VS 2010 to use the same highlighting for a file called .JSON as it uses for a JavaScript file? Just working on a client site and they've named all their JSON template files as .JSON, with the result that I just get a plain old text editor when I open it in Visual Studio. Any suggestions? I'm sure there must be an option somewhere that would do it but I can't find it so far... 回答1: Tools -> Options -> Text Editor -> File Extension End your extension 'json' and

Customize syntax highlighting colors of data types and variables for typescript in Visual Studio Code

天大地大妈咪最大 提交于 2019-11-30 22:49:05
I would like customize syntax highlighting colors for typescript. I use Visual Studio Code 1.16 and custom theme (Actual) Obsidian . I try use featues editor.tokenColorCustomizations . Here is my custom user settings. { "editor.fontSize": 20, "workbench.colorTheme": "(Actual) Obsidian", "editor.tokenColorCustomizations": { "functions": "#F1F1F1", "keywords": "#8EC160", "types": "#87CEEB", "numbers": "#F1F1F1", "variables": "#F1F1F1", "textMateRules": [ ] } } I don’t know how can I select a change color of: data types keywords (in the screenshot string, number, boolen) variables (in the

highlight and filter (gcc) compiler messages

蓝咒 提交于 2019-11-30 21:58:12
i'm currently refactoring a C-project, throwing about 1000 warnings at me. is there a way to highlight and filter these warnings. (eg make all index warnings red, unused blue, and some other) most likely some ides can do that, but that's no solution for me. Try the colorgcc Debian package . There are also three other packages I found: Johannes Schlüter's colorgcc , or this package in German , or this Sourceforge project This is really basic, but I've been using grep... make 2>&1 | grep --color -iP "\^|warning:|error:|" just to quickly draw the eye to the error line and offending section

How to physically print python code in color from IDLE?

做~自己de王妃 提交于 2019-11-30 19:36:18
I have searched for an answer to this but the related solutions seem to concern 'print' ing in the interpreter. I am wondering if it is possible to print (physically on paper) python code in color from IDLE? I have gone to: File > Print Window in IDLE and it seems to just print out a black and white version without prompting whether to print in color etc. Edit: It seems like this might not be available so the option is to copy code to a text editor like SciTE and print from there - quite like the default IDLE syntax highlighting though. IDLE can't do it, but you can do it in an indirect way:

highlight.js does not work with Angular 2

☆樱花仙子☆ 提交于 2019-11-30 19:33:34
I am trying to add syntax highlighting to my application using highlight.js but it doesn't seem to work with Angular 2. Could you please let me know what I might be doing incorrectly? Here is the Plnkr: https://plnkr.co/edit/G3NFFPGXKyc9mV1a6ufJ?p=preview This is the component import {Component} from 'angular2/core'; @Component({ selector: "my-app", template: ` Hello! <pre> <code class="html"> <html> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html> </code> </pre> ` }) export class AppComponent{ } and this is where I am adding highlight.js using cdn: <!DOCTYPE html>

Eclipse: Turn on syntax-highlighting for Classes and Objects

与世无争的帅哥 提交于 2019-11-30 18:51:29
Is there any possibility to turn on the highlighting for Classes and Objects in Eclipse like it is in Visual Studio? At the moment only the Variable names are highlighted. Left: Eclipse, Right: Visual Studio 2012 Image: ( http://image-uploader.de/bild.php/9468,unbenanntHU9EZ.jpg ) Preferences -> Java -> Editor -> Syntax Coloring Then just switch on / off what you want highlighted. try this Window -> Preferences -> Java -> Editor -> Mark Occurrences Full explanation here of how to add advanced syntax marking http://www.javalobby.org/forums/thread.jspa?threadID=15586 来源: https://stackoverflow

How do I add features to a syntax definition in Sublime Text without editing it?

强颜欢笑 提交于 2019-11-30 18:28:16
For example, I would like to highlight @param , @type , and @return (i.e. epytext declarations) in my Python docstrings. I have figured out how to do this by simply editing Python/Python.tmLanguage ; however, I would really like to put this in its own file, for a couple of reasons: I don't always want to apply this highlighting. It's only for projects that use epydoc as their documentation tool; in other projects, I would want to highlight reStructuredText instead. When Sublime Text updates, I'd like to have my own syntax as an overlay onto the included features. there are several features of

VIM syntax highlighting of html nested in yaml

时光总嘲笑我的痴心妄想 提交于 2019-11-30 18:22:04
Given a yaml file that contains html , like this: template : |+ <div>Hello, world</div> Is it possible in Vim (version 7.3.087) to highlight the html portion with html syntax highlighting? I found the post Different syntax highlighting within regions of a file , which seems to have exactly the concept I was looking for, but I cannot get it to work as expected with yaml . I'd expect to be able to do the following (as suggested in the link): " .vimrc " include the code from the above link call TextEnableCodeSnip('html' ,'#{{{html' ,'#html}}}', 'SpecialComment') Then have the yaml as, for example

Vim variable syntax highlighting

邮差的信 提交于 2019-11-30 18:11:25
I'd like to change my vim config file to allow highlighting of only my declared variables, not keywords. This article shows and explains what I mean: Alternate syntax highlighting I'm a beginner to vim (I've never changed the default config file). Could anyone point me in the right direction? As proof of concept, I tried let vars = ['init', 'editable', 'init_ui'] let colors = ['ff0000', '00ff00', '0000ff'] for var in vars execute 'syn keyword var_' . var var execute 'hi default var_' . var 'guifg=#' . remove(colors, 0) endfor and it worked as expected. This created syntax items for each

Change Github's Default Gist Styles

元气小坏坏 提交于 2019-11-30 17:47:11
Is it possible to change Github's gists default styles programmatically or through some interface? VonC I don't know of any API or interface influencing the way gist are presented on GitHub. If you include those gist in your blog, then of course some CSS local changes can make your gist different, as illustrated by this blog post , this CSS or this CSS . However, this doesn't concern syntax highlighting. You can only share those Gist with a custom stylesheet through, for instance Octopress , using a Sass port of Solarized syntax highlighting . But again, that won't change those gist