syntax-highlighting

.Net regex matching $ with the end of the string and not of line, even with multiline enabled

断了今生、忘了曾经 提交于 2019-11-28 02:04:43
I'm trying to highlight markdown code, but am running into this weird behavior of the .NET regex multiline option. The following expression: ^(#+).+$ works fine on any online regex testing tool: But it refuses to work with .net: It doesn't seem to take into account the $ tag, and just highlights everything until the end of the string, no matter what. This is my C# RegExpression = new Regex(@"^(#+).+$", RegexOptions.Multiline) What am I missing? It is clear your text contains a linebreak other than LF. In .NET regex, a dot matches any char but LF (a newline char, \n ). See Multiline Mode MSDN

Code completion and Syntax Highlighting in Swing

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-28 01:30:24
问题 I have started a project that requires syntax highlighting and code completion (a window pops up at the caret location providing suggestions) and can't find a suitable solution. There are multiple Swing components which take text input e.g. JTextArea, JTextPane and JEditorPane which makes it significantly more difficult to figure out which is the correct one to use. The project is a programmer specific text editor which will have integration with the unity game engine. This meaning code

Where can I find a list of all possible keys for tm-themes for syntax highlighting?

限于喜欢 提交于 2019-11-28 01:22:25
In the tmTheme file for my current text editor theme there are a number of options, including the ones in the code below. Is there a list somewhere that defines all possible tags that could be included in this list (eg. background , inactiveSelection , findHighlight , etc)? <dict> <key>background</key> <string>#1a1a1a</string> <key>caret</key> <string>#B6ECF9AF</string> <key>foreground</key> <string>#ecf0f1</string> <key>invisibles</key> <string>#F3FFB51A</string> <key>lineHighlight</key> <string>#2a2a2a</string> <key>selection</key> <string>#e74c3c55</string> <key>selectionForeground</key>

Syntax highlighting for Python chunks does not work

佐手、 提交于 2019-11-28 00:41:27
问题 I'm trying to create notebooks in which I present the same algorithm written in R and Python. I can easily integrate the R and Python code in a Rmd file and then create a HTML output using the 'Knit HTML' button in RStudio. However the Python code is always displayed without syntax highlighting (not like in the example at https://github.com/yihui/knitr-examples/blob/master/023-engine-python.md). I have Andre Simon's highlight software installed and functioning on my computer (MacBook Pro

Coloring instance variables in Visual Studio

点点圈 提交于 2019-11-27 23:14:58
问题 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;

Visual Studio thinks `Microsoft Web Developer Tools` is installed

丶灬走出姿态 提交于 2019-11-27 21:16:26
Symptoms Visual Studio syntax highlighter and Intellisense for Javascript and Razor views are not working. There is no Web templates installed when creating a new project. When I try to uninstall the web developer feature: Add or remove Programs > Microsoft Visual Studio Professional 2015 > Modify Microsoft Web Developer Tools is always checked. Even when I uncheck it and uninstall it, then restart the computer; the next time I still see it's checked: What I did to solve this: Running devenv.exe \resetuserdata Command to reset the user data. Running devenv.exe \installtemplates to install the

How to highlight source code in HTML? [closed]

家住魔仙堡 提交于 2019-11-27 19:04:07
I want to highlight C/C++/Java/C# etc source codes in my website. How can I do this? Is it a CPU intensive job to highlight the source code? Daniel Spiewak You can either do this server-side or client-side. It's not very processor intensive, but if you do it client side (using Javascript) there will be a noticeable lag. Most client side solutions revolve around Google Code's syntax highlighting engine. This seems to be the most popular one: SyntaxHighlighter Server-side solutions tend to be more flexible, especially in the way of defining new languages and configuring how they are highlighted

Quick documentation in Android Studio is not syntax highlighted

折月煮酒 提交于 2019-11-27 18:48:43
问题 I recently switched to Android Studio from Eclipse and I noticed that the Quick Documentation popup in Android Studio does not syntax highlight the Android documentation. How do I enable this? I have looked everywhere online and still have no solution.I am on Android Studio 0.5.4 on Mac OS Mavericks 10.9.2 回答1: Yesterday's update to Android Studio 0.5.5 fixed the problem for me! Seems it must be a glitch affecting version 0.5.4 only! 来源: https://stackoverflow.com/questions/23086511/quick

Embedded syntax highligting in Vim

非 Y 不嫁゛ 提交于 2019-11-27 18:25:23
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 file but couldn't figure it out. For your XML with python example you would have to do something like

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

萝らか妹 提交于 2019-11-27 17:23:39
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 I could use this markdown syntax: ```bash cd ~ ``` But it doesn't seem to work. It just wraps it in a