syntax-highlighting

Vim syntax highlighting of doxygen style docstrings in Python

↘锁芯ラ 提交于 2019-12-10 15:58:28
问题 I started working with doxygen to generate the documentation of my Python code. I use doxypy filter to preprocess the Python docstrings. My goal is to have a nice syntax highlighting of doxygen comments in Python. When writing my mainpage in a dedicated .dox file, I found that the doxygen comments can be highlighted in vim with the following command: set syntax=c.doxygen I tried the same command for Python but I got nothing: set syntax=python.doxygen I also made some googling and couldn't

Notepad++ : Custom Syntax Highlighting for .txt files

坚强是说给别人听的谎言 提交于 2019-12-10 14:13:29
问题 I keep code samples that I find useful as text files on my computer. I store them as txt files as opposed to the language in which they are written, so that they will open in Notepad++ instead of the editor (i.e. I don't want my c++ examples to open in an IDE, just Notepad). Is there a way I can have Notepad++ apply appropriate syntax highlighting to the text file by reading a special code in the text file itself? For example if I had some sql, the first line of the text file could read like

CodeMirror . Disabling Vertical scroll bar

会有一股神秘感。 提交于 2019-12-10 12:49:07
问题 I am currently using CodeMirror to edit CODE in text area in browser. If i have more than 20 lines of code, it is adding a vertical scroll bar to right. But i do not need this scroll bar. Instead i need the editor size to grow vertically. Can anyone help ? 回答1: In CodeMirror 3, there is an option to disable the scrollbars : scrollbarStyle: "null" From the documentation : scrollbarStyle: string Chooses a scrollbar implementation. The default is "native", showing native scrollbars. The core

Advice for implementing simple regex (for bbcode/geshi parsing)

僤鯓⒐⒋嵵緔 提交于 2019-12-10 12:17:39
问题 I had made a personal note software in PHP so I can store and organize my notes and wished for a nice simple format to write them in. I had done it in Markdown but found it was a little confusing and there was no simple syntax highlighting, so I did bbcode before and wished to implement that. Now for GeSHi which I really wish to implement (the syntax highlighter), it requires the most simple code like this: $geshi = new GeSHi($sourcecode, $language); $geshi->parse_code(); Now this is the easy

Jquery/Jquery mobile - Aptana Studio 3

时光怂恿深爱的人放手 提交于 2019-12-10 10:43:58
问题 I can't seem to find a good post for turning on syntax highlighting or intellisense for jquery/jquery mobile in Aptana Studio 3 for Mac. What I have found is out of date or the instructions don't match the version I have installed (like this SO post. Is it possible in Studio 3 for Mac? 回答1: Well right after I posted I found this answer on a SO post (which like all others didn't have the correct instructions, but this one was close enough to where I managed to find it) Here's what I did: 1)

Syntax highlighting for >= and <= operators in Sublime Text

送分小仙女□ 提交于 2019-12-10 10:39:02
问题 I am trying to get proper syntax highlighting for the Matlab operators >= and <= . Currently, only < and > are highlighted -- not the = . But e.g. == is highlighted. I've looked in the Matlab.tmLanguage file, and both >= and <= are included in the operator regex. What could be wrong here? 回答1: The issue is with the complete regex, which is found under: </dict> <key>operators</key> <dict> <key>comment</key> <string>Operator symbols</string> <key>match</key> <string>\s*(==|~=|>|>=|<|<=|&|&&|:|\

Enabling autocomplete for .API files?

狂风中的少年 提交于 2019-12-10 10:38:41
问题 Does anyone know how to get auto-complete working in Notepad++ using the .API files provided on the N++ site? Autocomplete works fine for me in languages which have an XML autocomplete file in the APIs folder, but completely non-functional for languages that use a .API file (ruby, AutoIt, others). From what I've been able to find online, all one needs to do is copy the .API or .XML file into the APIs folder, and make sure that the filename matches the language name in the language menu. I

Line Numbers, Code Highlighting in TextView

☆樱花仙子☆ 提交于 2019-12-10 09:47:22
问题 I'm working on an 'IDE' for Android - it could be useful for editing short scripts / making quick adjustments to files. At the moment I'm just using a simple EditText, but I am wanting to add several features, for example Line Numbering down the left hand side of the EditText and Code Highlighting. Does anyone have any suggestions about how to approach this? For the code highlighting, I'm guessing I'll need to write my own subclass of EditText. For the line numbering, could I have a thin

How can I color certain things in Emacs?

淺唱寂寞╮ 提交于 2019-12-10 08:49:26
问题 I program Django/Python in emacs, and I would like things like {% comment %} FOO {% endcomment %} to turn orange. How can I set up some colors for important Django template tags? 回答1: You could use dedicated modes like django-mode or MuMaMo. If you want something very basic, and assuming you're editing in html-mode , you could try the following: (defun django-highlight-comments () (interactive "p") (highlight-regexp "{%.*?%}" 'hi-orange)) (add-hook 'html-mode-hook 'django-highlight-comments)

Nano on server ignores certain syntax coloring

寵の児 提交于 2019-12-10 08:48:56
问题 I'm using nano on a server via ssh; on that system, nano doesn't have syntax color enabled by default. So I copied these nanosyntax files ( for alternative, see also @CraigBarnes' answer ) on the server, and had set up ~/.nanorc as: include "~/nanosyntax/syntax-nanorc/php.nanorc" include "~/nanosyntax/syntax-nanorc/php2.nanorc" include "~/nanosyntax/syntax-nanorc/sh.nanorc" include "~/nanosyntax/syntax-nanorc/python.nanorc" include "~/nanosyntax/syntax-nanorc/html.nanorc" include "~