syntax-highlighting

How to physically print python code in color from IDLE?

人盡茶涼 提交于 2019-11-30 03:50:14
问题 I have searched for an answer to this but the related solutions seem to concern 'print' ing in the interpreter. I am wondering if it is possible to print (physically on paper) python code in color from IDLE? I have gone to: File > Print Window in IDLE and it seems to just print out a black and white version without prompting whether to print in color etc. Edit: It seems like this might not be available so the option is to copy code to a text editor like SciTE and print from there - quite like

Syntax highlighting in emacs. Marking different data types with different colours

两盒软妹~` 提交于 2019-11-30 03:48:47
问题 In Emacs, is it possible to mark all variables of different data types with different colors? e.g. if I have the following variables in C/C++ my program int i,j; float g,h; char a,b; Then throughout the source code i and j would be marked as red, g and h as green, a and b as blue. I am not sure how useful this will be in future, but I feel it would help me while reading code, and be a good alternative to the Hungarian notation(not that I use this notation :D). 回答1: No. Emacs has no idea about

Is there a command line C++ to PDF converter with syntax highlighting? [closed]

荒凉一梦 提交于 2019-11-30 03:29:36
I need to supply "Source code documents w/ Line numbers" which is essentially just a PDF of the source code with syntax highlighting and Line numbers. Is there any existing command line tools for windows that I could call from a script as a "build release version" script? Right now I'm doing it manually using VC++, which isn't even the dev enviroment the code is for a TI processor, and a PDF printer driver, which has a pop up for each file I print. Two syntax highlighters I use are enscript and source-highlight . The first can output to PostScript (that you can convert to PDF using ps2pdf),

Django templates syntax highlighting in Eclipse

橙三吉。 提交于 2019-11-30 03:20:09
I use Eclipse and pydev for django development. This has worked more or less ok, including debugging. Syntax highlighting doesn't seem to work everywhere though. I couldn't get any highlighting for the templates thought. Is there a way to get the highlighting and code suggestions for the templates? The latest PyDev versions include a Django template editor, but it's not compatible with vanilla Eclipse. You have to use Aptana Studio instead. Just use http://pydev.org/nightly as update URL, the PyDev and Django template editor packages should be there. Django Editor Plugin for Eclipse For

Eclipse: Turn on syntax-highlighting for Classes and Objects

末鹿安然 提交于 2019-11-30 03:06:37
问题 Is there any possibility to turn on the highlighting for Classes and Objects in Eclipse like it is in Visual Studio? At the moment only the Variable names are highlighted. Left: Eclipse, Right: Visual Studio 2012 Image: (http://image-uploader.de/bild.php/9468,unbenanntHU9EZ.jpg) 回答1: Preferences -> Java -> Editor -> Syntax Coloring Then just switch on / off what you want highlighted. 回答2: try this Window -> Preferences -> Java -> Editor -> Mark Occurrences 回答3: Full explanation here of how to

Notepad++ Custom Language Highlighting

萝らか妹 提交于 2019-11-30 02:56:00
I have a specific language (its private, and closed source) that I'm writing code highlighting for in Notepad++. I've never done anything like this before... so, for the most part, I'm clueless. There are a bunch of keywords, and I've figured out how to implement those, but the strings are denoted by square brackets ( [ and ] ) instead of normal quotes. How do I register those as strings in the XML file? Another thing, the language relies heavily on recursion and nesting; is there some way to say "Level 1 of the square brackets is this color, level 2 is this color, etc..."? Matthew Strawbridge

How do I add features to a syntax definition in Sublime Text without editing it?

孤人 提交于 2019-11-30 02:49:41
问题 For example, I would like to highlight @param , @type , and @return (i.e. epytext declarations) in my Python docstrings. I have figured out how to do this by simply editing Python/Python.tmLanguage ; however, I would really like to put this in its own file, for a couple of reasons: I don't always want to apply this highlighting. It's only for projects that use epydoc as their documentation tool; in other projects, I would want to highlight reStructuredText instead. When Sublime Text updates,

Make Geany recognize additional file extensions

断了今生、忘了曾经 提交于 2019-11-30 02:40:40
问题 My default Geany installation on Debian does not recognize some file types out of the box. How can I add extensions, using the same syntax highlighting as other known extensions for simplicity's sake? In the current case, I'd like Geany to open all .aspx files with the same highlighting as .html files. 回答1: Use inside the menu Tools->Configuration files->filetype_extensions.conf. This will allow you to configure the filetypes based on suffix for your user. 回答2: Just add new extensions in /usr

VIM syntax highlighting of html nested in yaml

梦想与她 提交于 2019-11-30 02:35:03
问题 Given a yaml file that contains html , like this: template : |+ <div>Hello, world</div> Is it possible in Vim (version 7.3.087) to highlight the html portion with html syntax highlighting? I found the post Different syntax highlighting within regions of a file, which seems to have exactly the concept I was looking for, but I cannot get it to work as expected with yaml . I'd expect to be able to do the following (as suggested in the link): " .vimrc " include the code from the above link call

Xcode 8 syntax highlighting doesn't work

十年热恋 提交于 2019-11-30 02:03:24
The code above has correct syntax highlighting in Xcode 7 . It is mix of Obj-C + Swift: I've updated project to support Xcode 8 and only few things was changed: In Build Settings Swift 2.3 support And have fixed few errors related to implicitly unwrapped properties in UIKit After all the project is compiled fine for Xcode 8 . But Obj-C code integrated in Swift doesn't have any syntax highlighting and vice versa: And there is << error type >> problem with autocomplete: Derived data deleting doesn't help, Xcode restart either :) CocoaPods version 0.38.2, iOS 7 This answer helped me https:/