FAQ Database Discussion Community

IntelliJ IDEA - Syntax Highlighting of SQL Inside Java Code

I am using IntelliJ 13 as an IDE for a project where communication with DB is done via Spring's JDBC Template. When I have code fragments in Java like the following one: getJdbcTemplate().queryForObject("SELECT CONVERT(VARCHAR(255), NEWID())", String.class); where getJdbcTemplate() returns initialized JdbcTemplate object, the IDE has proper syntax highlighting for the...

IPython change input cell syntax highlighting logic for entire session

You can use extensions or display helpers in IPython to make whatever syntax highlighting you'd like on output cells. For some special cell magics, like %%javascript you can also see the input cell itself is rendered with that language's natural syntax highlighting. How can you cause every input cell to...

Highlighting bash code with knitr / rmarkdown

I'm trying to generate an HTML report using RStudio, R Markdown and knitr. In the report I would like to display some bash code. I do not want to run the code but I would like it to be highlighted. It has been mentioned in another question but the suggestion...

Synedit syntax-highlighter for HL7 v2.x messages

I am looking at contributing to the Delphi SynEdit project with a syntax-highlighter for the Health Level 7 (HL7) v2 messaging Standard. I have no experience of creating a highlighter from scratch and there are two quirks that I have stumbled upon that differ from existing highlighters: Fixed position keywords...

Visual Studio red highlighted code lines

I have some line of code highlighted in red, I don't think there is something wrong with them, maybe I accidentally entered a key combination. How can I remove it? ...

Groovy syntax highlighting for Kate

Is there a way to add syntax highlighting for the Groovy language in kate? Or is there a quite similar language, that will work as well?...

Is it possible to highlight ObjC code in Intellij IDEA?

Intellij IDEA have IDE AppCode for iOS projects on ObjC/Swift. I am develop crossplatform app (android and ios supports) on Cordova which contain Java, JS and ObjC as base languages. And unforunately IDEA do not highlight ObjC code. I have not found a plugin that would it did. Is it...

Difficulty getting pre and code tags to scroll rather than wrap

My website is built using a static site generator I created myself, and uses Bootstrap for the layout. I'm using Highlight.js for the syntax highlighting (running server-side as part of the build process) and it's working pretty well. However, one thing has stumped me. I would like the code tags...

Highlight for java? [closed]

I'm basically writing a website with play framework and I want to turn code snippets to nicely formatted, highlighted html code. Is there any java library on maven that deals with raw code formatting to html like linux command "highlight" does? If there's no such thing worst case scenario is...

Markdown syntax highlighting not working as expected

In Sublime Text 3 I am using the package Markdown Extended and Markdown Preview to build the Markdown documents I write. I am trying to get nicely formatted JavaScript code, however, for some reason it isn't being built and displayed correctly. In Sublime, the code is highlighted and looks great,...

Make Webstorm highlight .txt files as HTML

So I have some project files all with .txt extensions which are really HTML templates. I am trying to syntax highlight those .txt files as HTML using Webstorm. Any tips on how to do that?

Creating a syntax for the in-program functionality [closed]

In Java, I'm trying to make a program that has a input text area which will react to some syntax defined priorly by me. It should highlight whenever I write the keyword among other words and should do whatever I commanded for. My question is how to create such syntax?...

Proper syntax highlighting in Sublime 3 for a file written in several languages

I am editing e.g. shell scripts with here-documents in other languages (awk, python, R, JavaScript, you name it). Sublime 3 guesses the overall syntax but doesn't do that for the included here-document. How can I prod Sublime in the requisite direction, e.g. by placing any special comments in the code...

Android Studio: Copy text with syntax highlighting

I am writing a programm with Android Studio V1.1 and I want to copy my code into a MS Word 2013 document. When I copy the code its just black in Word. Is there a way to copy the text with syntax highlighting? I copied the code into Notepad++ and...

Mako Sytanx-Highlighting for Geany

Is there a Mako-template syntax-highlighting for Geany? or would I need to make a customized one? Thank you!...

Syntax Highlighting not working properly

So, I've been working on a Script Editor in C# in Visual Studio 2013 and of course I want to have syntax highlighting as a feature. I have the following code: programTextBox.Enabled = false; Regex cKeyWords = new Regex("(auto|break|case|char|const|continue|defaut|double|else|enum|extern|float|for|goto|if|int" + "|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)"); int selectStart = this.programTextBox.SelectionStart; int programCurrentLine =...

Eclipse Plugin Development: How to highlight syntax in texteditor?

Given a java method name, i want to highlight it in the TextEditor. I have reference to the texteditor in ITextEditor.

How do I enable syntax highlighting for Fortran in GitBook

Original Question: I can't find how to activate syntax highlighting on GitBook! It works perfectly when I look at the .md files on GitHub where my repository is hosted, by not when I look at my rendered gitbook on the web. Any ideas? Thanks Edit: it works for bash, Python,...

How to change the syntax highlight color in GNU Enscript?

GNU Enscript is a free replacement for Adobe enscript program, and I downloaded it for syntax highlighting and *.ps output, but can I change the default color model? I found that there is a file named c.st in /usr/share/enscript, but it's just listed about keywords but not their colors. For...

Emacs major mode for emerald. Correct highlighting

Long story short: I am a student and in one of my courses we have to use/learn the emerald programming language. After a quick google search I found that somebody already wrote a major-mode for it. Link to the script The problem: After the first comment line "%...", syntax highlighting...

Syntax highlighting Fortran code in IPython notebook

I want to include some Fortran code in my IPython notebook. How do I get the code snippet to be syntax highlighted ?

How to manually set language for syntax highlighting in Visual Studio Code

Before the confusion begins, this question is about Code, the new lightweight Visual Studio Editor. You can get it from here: https://code.visualstudio.com/ I have a textfile (.txt) with CSS in it and want to get syntax hightlighting. You can open the command palette with ctrl+shift+p. But there you can not...

Generate syntax highlighting for markdown in slim

I'm using slim in my rails app to generate my views, and have enabled the markdown engine (with redcarpet) so I can write markdown in my slim files like so: h2#usage Usage markdown: ### Via JavaScript Call the dropdowns via JavaScript: ```js $('.dropdown-toggle').dropdown() ``` I've also enabled fenced code blocks...

Emacs: syntax highlight for non-code files

Let's us suppose I want to create a file (using emacs) to explain something about programming. For example, a mylib-tutorial.txt. Is there a way to turn on syntax highlight on specific parts of a file containing code? For example: Tutorial --------- This call behaves as follow: void foo(&resource); This call...

Avoid font-locking interfering inside of comments

In my font-lock-defaults I have: ("\\(^\\| \\|\t\\)\\(![^\n]+\\)\n" 2 'factor-font-lock-comment) The comment character is ! and this makes it so comments get the right face. This works mostly, except when there is a competing font-locked entity inside the comment, like a string (delimited by double quotes): ! this line is font-locked...

PhpStorm - wrong syntax highlighting with Blade

When I create a Blade template in PhpStorm, for example login.blade.php, syntax highlighting works correctly. But when I name it layout.blade.php, it doesn't. Why? How can I fix it? ...

Having Geany support syntax highlighting for my DSL

For the DSL I have developed, I wanted to have Geany support it as it does the embedded languages like java and C#. I created filetypes.myLang.conf and added the configuration fields as in the manual. For the filed [settings] I added : lexer_filetype=C Now everything seems fine. My language comes...

How can I apply basic html formatting to a sublime text syntax definition only within

Ok so by the following yaml definition, shouldn't only what's in between {blah} and {!blah} get text.html.basic syntax highlighting? And the {blah} tags themselves take the highlighting of a comment? Unfortunately it's not happening that way. HTML highlighting is anywhere in the document, and {blah} doesn't get comment highlighting. #...

Differences in R Markdown syntax highlighting for in-line code

The following minimal R Markdown file minimal.Rmd produces different minimal.html output (via "Knit HTML" in RStudio) depending on my system. The first is the result on my Windows 8 machine. The second is the result on my Windows 7 (64-bit) machine. Differences: Red syntax highlighting on in-line code in Win8...

How to use CDN hosted highlight.js using Rails?

Where do I place the following links to get highlight.js to work on my Rails application (https://highlightjs.org/download/)? <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/default.min.css"> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script> ...

How to add Error Markers in Visual Studio 2010 (C++)?

I seem to have lost the default error markers(highlighting), those curly wavy red lines that appear in the TextEditor of VS2010 IDE (for C++) when you type something that isn't syntactically correct (syntax errors, non existing overloads, ...etc). Is there a way to reset them to default settings?...

Get highlighted variable -Eclipse

I am implementing an Eclipse plugin for C programmers. I can't find a way to get the variable that the user already highlited.(The user will highlight a variable in the editor and I need to know which variable it is/variable's name/location of this variable in the editor, like line number..)...

XHTML: how to highlight matching tag?

I'd like highlighting of the matching HTML tag when the cursor is on the specific tag. I'm looking for something like highlight matching parentheses in options menu. I've checked the question How can I highlight unmatched HTML tags in Emacs? which is close to what I search but I want...