FAQ Database Discussion Community


IntelliJ IDEA - Syntax Highlighting of SQL Inside Java Code

java,sql,intellij-idea,syntax-highlighting
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

python,ipython,syntax-highlighting,ipython-notebook
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

r,syntax-highlighting,rstudio,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

delphi,syntax-highlighting,hl7,edi,synedit
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

visual-studio,visual-studio-2013,syntax-highlighting
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

grails,groovy,syntax-highlighting,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?

objective-c,intellij-idea,syntax-highlighting
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

css,syntax-highlighting,highlight,pre
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]

maven,playframework-2.0,sbt,syntax-highlighting
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

javascript,markdown,syntax-highlighting,sublimetext,sublimetext3
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

syntax-highlighting,webstorm
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]

java,syntax,syntax-highlighting
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

syntax-highlighting,sublimetext3
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

android,android-studio,ms-word,syntax-highlighting,export-to-word
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

syntax-highlighting,mako,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

c#,winforms,syntax-highlighting
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?

eclipse,eclipse-plugin,syntax-highlighting
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

syntax-highlighting,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?

c,syntax-highlighting,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

emacs,comments,syntax-highlighting,major-mode
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

fortran,syntax-highlighting,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

editor,syntax-highlighting
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

ruby-on-rails,syntax-highlighting,slim-lang
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

file,emacs,syntax-highlighting
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

emacs,elisp,syntax-highlighting,font-lock,major-mode
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

laravel,syntax-highlighting,phpstorm,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

syntax-highlighting,dsl,geany
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

syntax-highlighting,sublimetext,sublimetext3,definition
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

r,syntax-highlighting,rstudio,rmarkdown
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?

javascript,ruby-on-rails,syntax-highlighting,highlight.js
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++)?

c++,visual-studio-2010,syntax-highlighting,intellisense
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

java,eclipse-plugin,syntax-highlighting,eclipse-cdt,highlight
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?

emacs,xhtml,syntax-highlighting
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...