syntax-highlighting

CodeMirror HTML mode not working

放肆的年华 提交于 2019-11-29 16:11:41
问题 I'm trying to style code samples with CodeMirror, but it works partially - it applies the selected theme to the textarea but the syntax is not highlighted. There is my page: <textarea id="template-html" name="code" class="CodeMirror"> <!DOCTYPE html> <foobar> <blah>Enter your xml here and press the button below to display it as highlighted by the CodeMirror XML mode</blah> <tag2 foo="2" bar="bar" /> </foobar> </textarea> <link rel="stylesheet" type="text/css" href="/site.com/css/codemirror

IDE with syntax highlight support for LESS

你。 提交于 2019-11-29 16:08:19
问题 Is there any IDE with syntax highlight support for LESS? 回答1: Eclipse does not support .less fully (nested rules, single line comments, etc) but you can at least configure it so that it would open .less files and treat them as .css. Preferences > General > Content Types: find "CSS" entry and add .less extension. Then, Preferences > General > Editors > File Assoc: add .less extension and associate with CSS editor. Better than nothing, especially if you're into Eclipse world ;) 回答2: JetBrains

Sweave syntax highlighting in output

↘锁芯ラ 提交于 2019-11-29 15:33:56
问题 Has anyone managed to get color syntax-highlighting working in the output of Sweave documents? I've been able to customize the output style by adding boxes, etc. in the Sweave.sty file as follows: \DefineVerbatimEnvironment{Sinput}{Verbatim}{fontseries=bc,frame=single} \DefineVerbatimEnvironment{Soutput}{Verbatim}{frame=leftline} \DefineVerbatimEnvironment{Scode}{Verbatim}{fontseries=bc} And I can get the minted package to do syntax highlighting of verbatim-code blocks in my document like so:

Syntax Highlighting library in ActionScript

走远了吗. 提交于 2019-11-29 15:22:08
问题 I let user enter some code in my Flex3 (Flash 10) app and I want to do syntax highlighting. Is there any open-source library that would help me? I'll need a Lua syntax support, but I can add it myself if library has a resonable interface to do this. 回答1: Update on 21 Jan, 2009: Check out Anirudh's port of google-code-prettify to ActionScript3, it has a very good example app as well. 回答2: I guess this wasn't even feasible till now. With the new Flash Text Engine, maybe such text-based features

How to create a simple custom language colorization to VS Code

五迷三道 提交于 2019-11-29 13:27:51
问题 I'm trying to create a simple colorization for log files, now that it's possible include custom languages in Code (I'm on 0.9.2). I have created a simple .tmLanguage file for colorizing the letter 'q', just for starting up, but have been unsuccessful. My new language, log , is associated correctly with the file extension and I can also select it manually from inside Code, but no coloring takes places. I have a feeling it has to do with what "scope" I associate my pattern with, but I'm not

Jquery/Javascript - Syntax highlighting as user types in contentEditable region

最后都变了- 提交于 2019-11-29 11:52:25
问题 I'm developing a contentEditable region on my website, where users will be able to type messages to each other. <div contentEditable="true" class="smartText">User types here...</div> The thing is, we will have smart text inside, meaning that if a user type @usersame inside this div, the @username should be highlighted in blue if the username exist and green if he doesn't exist. And of course all of this should happen as the user types... I have no idea where to start, right now I have this: $

Javascript syntax highlighting in Eclipse not working?

人盡茶涼 提交于 2019-11-29 10:45:40
I would like syntax highlighting for some Javascript code that I am working with, so I installed "Web Developer Tools" and "Javascript Developer Tools" through Eclipse. I checked the preferences to make sure the syntax highlighting was enabled but it doesn't seem to be working. I did some searching and it seems that for projects that are not created as Javascript projects, the syntax highlighting doesn't work . Actually, I am not sure how to implement the solution on that webpage, I'm not really sure what "vim" is. (I don't think it's the text editor) Is there an alternate way to get this

Coloring instance variables in Visual Studio

限于喜欢 提交于 2019-11-29 09:15:09
Is it possible to color instance (and static) variables in C# code in Visual Studio 2010, perhaps using a lightweight extension? In following example name and age should be colored but test not. Of course, usages of variable highlighting is grat feature but this is something different. I want instance variables to be colored all and always. Many people use _underscores to distinguish instance variables but I prefer to use coloring. public class Kid { private string name; private int age; public Kid() { name = "N/A"; string test = "XYZ"; } } Reed Copsey This is not possible directly with Visual

Adding syntax coloring to Xcode for unknown file extension such as “.tcl”

久未见 提交于 2019-11-29 08:50:58
I want to ask a question about Xcode syntax coloring (highlighting). I am working with files all the time .tcl files all the time and Xcode does not know extension and as default it opens them with "Generic" syntax coloring option. In this situation, "AppleScript" in the syntax coloring section will be very nice for files with .tcl extension to see all the colors for different things in the code. So, how can i add a new option for .tcl files or how can i change the "Generic" one which appears when i open a .tcl file in Xcode ? Is there any way to do it as defaultly open the .tcl files with

Razor @if inside <script> is rejected by VS11

独自空忆成欢 提交于 2019-11-29 06:37:07
Is the following markup incorrect, or is it a bug in the Razor engine in MVC4? Either way, what's the best workaround? The entire content of View1.cshtml is shown. It compiles fine, but the Intellisense error highlighting is annoying. (Included as an image so you can see how the syntax is rejected by VS11.) Hote that the @: syntax (instead of <text></text> ) isn't accepted either. It's a little tricky to mix JavaScript with Razor. Personally, I find it easier to always separate these two guys by using either Razor @function or Razor custom @helper . Here's a simple example: <script type="text