syntax-highlighting

How to create a user-defined language in Notepad++ based on an existing language?

霸气de小男生 提交于 2019-11-30 17:34:56
I frequently work with files that have an extension of .ebs. This is a language based on vbscript with a number of new keywords. Currently I set notepad++ to just use the built-in vb highlighting for files with extension .vbs. Works ok, but the custom keywords do not get highlighted. I would like to create a user-defined language for the .ebs files but base it off of the built-in vb language. Is this possible? I searched but the built-in languages do not have an associated .xml file to copy and change. iehrlich All highlights are situated in \langs.model.xml and \stylers.model.xml. Copy the

highlight and filter (gcc) compiler messages

夙愿已清 提交于 2019-11-30 17:28:25
问题 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. 回答1: 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 回答2: This is really basic, but I've been using grep... make 2>&1 | grep

Prism HTML highlighter

不打扰是莪最后的温柔 提交于 2019-11-30 17:19:42
I'm using Prism and its working well for CSS: <pre><code class="language-css">p { color: red }</code></pre> but i can't get it working for html: <pre><code class="language-html"><p class="red">red text</p></code></pre> I have 2 problems: < and > are represented as tags, not as text, but i could replace it by < and > More important, even replaced as shown in problem 1, the highliter will not highlight any code and everything is just black. Despite that it is working for CSS, whole code looks like this: <!DOCTYPE html> <html> <head> <link href="prism.css" rel="stylesheet" /> </head> <body>

Making Eclipse view different file extensions as PHP

此生再无相见时 提交于 2019-11-30 16:54:39
I have several file extensions, like .module , that I would like to be understood by Eclipse to be PHP - so I get the same syntax highlighting, code completion, etc features as I would if I were editing a .php file. How can I do this? I went to Window >> Preferences >> General >> File Associations and added *.module to the file types list. When I click on *.module , it now says the associated editors are the PHP Editor and the Text editor. However, when I open the *.module file to edit it, it gives me an error message: Unsupported content type in editor. To associate a file extension with a

How Is Syntax Highlighting Built?

雨燕双飞 提交于 2019-11-30 16:45:47
I'm now building a developers editor using Lazarus and as every good developers editor, it needs to have a syntax highlighting, because of this that I want to know some things: How is syntax highlight normally built(using many if s to change the font on a TextField ? TSynEdit is very nice to do this? How to use TSynEdit (links and resources)? You can actually see an excellent example for yourself if you look at the editor for SharpDevelop . It's implemented in C# but uses great OOP that should be readily portable to other platforms or languages. Most home-brewed syntax highlighters tend to use

How do you get Vim to highlight C++ syntax errors like Visual Studio?

可紊 提交于 2019-11-30 16:30:32
问题 Is it possible to get gVim to highlight C++ syntax errors (the red squiggles underneath) in real-time like Visual Studio? 回答1: Short answer: Yes, but it won't be so smooth / immediate as in IDEs. Long answer: Whereas IDEs have built-in support (and parsers, etc.) for a (usually very limited) set of programming languages, Vim is a general-purpose editor, and therefore has to rely on external tools to do the syntax checking. The built-in way is to execute :make and receive a list of (syntax or

Making Eclipse view different file extensions as PHP

扶醉桌前 提交于 2019-11-30 16:23:16
问题 I have several file extensions, like .module , that I would like to be understood by Eclipse to be PHP - so I get the same syntax highlighting, code completion, etc features as I would if I were editing a .php file. How can I do this? I went to Window >> Preferences >> General >> File Associations and added *.module to the file types list. When I click on *.module , it now says the associated editors are the PHP Editor and the Text editor. However, when I open the *.module file to edit it, it

adding syntax highlighting to Jupyter notebook cell magic

不羁岁月 提交于 2019-11-30 15:37:05
问题 I'm trying to figure out how to activate CodeMirror syntax highlighting for a CodeMirror-supported language (cypher) within a cell for a custom Jupyter cell magic ( %%mymagic ). The magic isn't associated with a special kernel - it just runs Python commands that process the string entered into the cell that I want to highlight. From what I can tell, this ostensibly can be done using something like from notebook.services.config.manager import ConfigManager cm = ConfigManager() cm.update(

Change Github's Default Gist Styles

一笑奈何 提交于 2019-11-30 14:49:07
问题 Is it possible to change Github's gists default styles programmatically or through some interface? 回答1: 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,

Highlighting kills my Razor syntax in Visual Studio 2010

你说的曾经没有我的故事 提交于 2019-11-30 14:38:58
问题 I'm using Expression theme in Visual Studio 2010 Ultimate on Windows 7 operating system. ( Note : Actually, I'm not sure this problem occurs because of the dark theme) A few days ago, I decided to learn ASP.NET MVC 4 and tried to create a small web application. In Visual Studio, I followed this instruction and created a new asp.net mvc 4 web application: File->New->Project->ASP.NET MVC 4 Web Application. Everything was perfect. But when I opened the Login.cshtml file, I couldn't even see the