Jenkinsfile syntax highlighting in Java project using IntelliJ IDEA

If you want IDEA to recognize a Jenkinsfile as a Groovy file, then you can add the String “Jenkinsfile” as a valid file name pattern (normally contains file endings) for Groovy files. This is supported “out of the box” without requiring any additional Plugin (except the “Groovy” Plugin, but that is already part of IDEA). … Read more

Diff syntax highlighting in Github Markdown

Github’s markdown supports diff when formatting code. For example: “`diff public class Hello1 { public static void Main() { – System.Console.WriteLine(“Hello, World!”); + System.Console.WriteLine(“Rock all night long!”); } } “` Output: and it should give you the Diff looks you are looking for, highlighting in red what has been removed and in green what has … Read more

Syntax highlighting/colorizing cat

I’d recommend pygmentize from the python package python-pygments. You may want to define the following handy alias (unless you use ccat from the ccrypt package). alias ccat=”pygmentize -g” And if you want line numbers: alias ccat=”pygmentize -g -O style=colorful,linenos=1″ Add one of these above commands to ~/.bash_aliases for permanent effect