syntax-highlighting

Pandoc: What are the available syntax highlighters?

北慕城南 提交于 2019-12-02 15:09:02
Bullet point 18 of http://pandoc.org/demos.html#examples shows how to change the syntax highlighter used by giving an argument to --highlight-style . For example: pandoc code.text -s --highlight-style pygments -o example18a.html pandoc code.text -s --highlight-style kate -o example18b.html pandoc code.text -s --highlight-style monochrome -o example18c.html pandoc code.text -s --highlight-style espresso -o example18d.html pandoc code.text -s --highlight-style haddock -o example18e.html pandoc code.text -s --highlight-style tango -o example18f.html pandoc code.text -s --highlight-style zenburn

Persistent :set syntax for a given filetype?

我的未来我决定 提交于 2019-12-02 15:00:28
I'm working on a Symfony2 project which uses Twig, and the filetypes are myfile.html.twig . Vim doesn't automatically detect the syntax highlighting and so applies none. I can use :set syntax=HTML after I've opened the file but this is a pain when jumping between files. Is there a way to persistently set the syntax highlighting for a specific file type in vim? You can use autocmd to accomplish that, i.e.: augroup twig_ft au! autocmd BufNewFile,BufRead *.html.twig set syntax=html augroup END Should work. Muhammad Reda Add one of the following passages to your .vimrc : " Set the filetype based

Vim Configure Line Number Coloring

安稳与你 提交于 2019-12-02 14:25:42
I'm looking for a way to configure the color used for line numbering (as in: :set nu ) in Vim. The default on most platforms seems to be yellow (which is also used for some highlighted tokens). I would like to color the line numbers a dim gray; somewhere in the vicinity of #555 . I'm not picky though, any subdued color would be acceptable. Try: help hl-LineNr I found this through: help 'number' which is the way to get help on the 'number' option, instead of the :number command. To actually change the displayed colour: :highlight LineNr ctermfg=grey This would change the foreground colour for

How do I get “rainbow parentheses” in emacs?

允我心安 提交于 2019-12-02 14:09:50
I would like rainbow parens for editing Clojure in Emacs and since VI does this I assume that in Emacs it should be something like M-x butterfly or something :) Jeremy Rayman This is an old question now, but I recently wrote RainbowDelimiters mode for this. It's a 'rainbow parens'-type mode which colors all parens, brackets and braces, made with Clojure programming in mind. It highlights the whole buffer, not just the parens surrounding point. The most important thing is that it's FAST - all the other rainbow paren modes I've tried slow down editing (especially scrolling) quite a lot. I put

Enabling Git syntax highlighting for Mac's terminal

爷,独闯天下 提交于 2019-12-02 14:00:43
I miss the Git syntax highlighting I had on Windows for every "git .*" command like green staged filenames, some bolding, etc. How do I enable Git syntax highlighting for Mac's terminal? git config --global color.ui auto For seeing different colors for the diff command, use: git config --global color.diff true To globally change colors for most commands, use: git config --global color.ui true Colors in Git Git can color its output to your terminal, which can help you visually parse the output quickly and easily. A number of options can help you set the coloring to your preference. color.ui Git

How To Format A Block of Code Within a Presentation? [closed]

£可爱£侵袭症+ 提交于 2019-12-02 13:52:25
I am preparing a presentation using Google Slides, though I can also work on the presentation within Open Office that will include code snippets. Is there any easy way to perform basic syntax highlighting on the code snippets with either Google Docs or Open Office Presenter? Edit: Since I believe that I can find a way to embed HTML, any tools that can perform syntax highlighting on HTML would also be welcome suggestions. An on-line syntax highlighter: http://markup.su/highlighter/ Just copy and paste into your document. EDIT: Seems the above site is temporarily down so heres an alternative:

How to detect multiline paste in RichTextBox

我怕爱的太早我们不能终老 提交于 2019-12-02 12:59:23
问题 At the moment I'm working on a simple syntax highlighter and I have couple of problems. Could you help me out? I have a class library with a component class in it. Everything is in VB.NET. It's only one file so you can see it here https://gist.github.com/2366507 . On line 92, there is the OnTextChanged Sub. I was thinking about adding ProcessAllLines() (as on line 128) to the end of that Sub, and it worked. However when I was typing in code to the RichTextBox (source which I used is here

To have R chunk in line with text using knitr

你说的曾经没有我的故事 提交于 2019-12-02 11:22:20
How to have R code (R chunk) inline with my text? Example: Please install the package by using install.packages("ISwR") whereby, install.packages("ISwR") is automatically highlighted as R chunk using knitr? In other words, I would like to have R code at the same line with my text. Following a suggestion from Yihui , \documentclass{article} <<setup, include=FALSE>>= knit_hooks$set(inline = function(x) { if (is.numeric(x)) return(knitr:::format_sci(x, 'latex')) knitr:::hi_latex(x) }) @ \begin{document} Please install the package by using \Sexpr{'install.packages("ISwR")'}. \end{document} You can

Highlight the jQuery $ variable in Sublime Text 3 (build 3103)

只愿长相守 提交于 2019-12-02 07:48:42
In Feb 2016, the update to build 3103 broke a custom theme of mine, mostly in regard to Javascript. I really miss the ability to target the $, it seems that it's now under the scope: meta.function-call.with-arguments.js variable.function.js when modifying the theme. I want to know if there's a way to bypass or over-rule the $ sign, perhaps some REGEX or a way to add scope into the .tmLanguage file, so that I may color it differently from other "variable functions". Until the unpaid/non-dev Sublime Text 3 is updated >= build 3106, follow these instructions to theme your $ variable in JavaScript

Code highlighting in LaTeX for Swift

て烟熏妆下的殇ゞ 提交于 2019-12-02 07:22:02
问题 I found some solution with listings or minted to put source code into my LaTeX document but I would like to have Swift code highlighted. Any hints ? 回答1: Swift works out of the box with minted: \documentclass{article} \usepackage{minted} \begin{document} \begin{minted}{swift} let x = 42 println("Hello, \(x)!") \end{minted} \end{document} with xelatex -shell-escape x produces Note, however, that this requires Pygments 2 to be installed. 回答2: Have a look at the listings package. While I'm not