syntax-highlighting

Syntax highlighting/colorizing cat

筅森魡賤 提交于 2019-11-26 17:53:09
问题 Is there a method to colorize the output of cat , the way grep does. For grep , in most consoles it displays a colored output highlighting the searched keywords. Otherwise, you can force it by calling grep --color Is there a generic way to color the output of any program according to your personal choice. From what I understand, the program itself is not responsible for the colors. It is the shell. I am using the default shell in FreeBSD 5.2.1 which looks like it has never seen colors since

Where can I find a syntax highlighting library for Java? [closed]

早过忘川 提交于 2019-11-26 17:37:25
问题 I'm writing a source-code editor in Java (for Java source code), and I'd like to add simple syntax highlighting (distinctive coloring for keywords would suffice). Any suggestions? 回答1: Something like JSyntaxPane, perhaps? A very simple to use and extend JEditorKit that supports few languages. The main goal is to make it easy to have nice looking Java Swing Editors with support for Syntax Highlighting. 回答2: What about RSyntaxTextArea? It uses a modified BSD license. 回答3: You first should think

Can I make vim do syntax highlighting on C++ headers that don't have extensions?

天涯浪子 提交于 2019-11-26 17:11:07
问题 I have a project with a bunch of C++ header files that follow the standard C++ header naming convention; that is, a class called Foo would be declared in a file called Foo , not Foo.h or Foo.hh . Is there a good way to configure vim to do syntax highlighting for these files only? A slightly-less-pleasing fallback would be to enable C++-style highlighting for all files that don't have an extension. I'm not sure if there's any more sophisticated way to detect the type of file instead of relying

Wrong default syntax highlighting in sublime text 3

纵饮孤独 提交于 2019-11-26 16:54:38
问题 I can't remember touching any related configuration, and for no reason, Sublime chooses "LaTeX Log" highlighting syntax as default for *.html files. I opened the Syntax Specific settings file and it's empty (?) What can I do in order to get the proper highlighting for html files automatically? 回答1: Changing the syntax highlighting for any file type is easy in Sublime. Simply open a file with the extension you want to change, then click on View -> Syntax -> Open all with current extension as..

Syntax highlighting code with Javascript [closed]

百般思念 提交于 2019-11-26 15:37:21
What Javascript libraries can you recommend for syntax highlighting <code> blocks in HTML? (One suggestion per answer please). AaronSieb StackOverflow uses the Prettify library. I recently developed one called rainbow. The main design goal was to make the core library really small and make it really easy for developers to extend. See http://rainbowco.de . mlambie SyntaxHighlighter is available as a GitHub project . balupton jQuery Syntax Highlighter is a new one based on Google's Prettify - a really really really popular plain javascript syntax highlighter. It supports such things as code and

PHP syntax highlighting [closed]

佐手、 提交于 2019-11-26 15:13:47
问题 I'm searching for a PHP syntax highlighting engine that can be customized (i.e. I can provide my own tokenizers for new languages) and that can handle several languages simultaneously (i.e. on the same output page). This engine has to work well together with CSS classes , i.e. it should format the output by inserting <span> elements that are adorned with class attributes. Bonus points for an extensible schema. I do not search for a client-side syntax highlighting script (JavaScript). So far,

Xcode: code loses syntax coloring

孤街浪徒 提交于 2019-11-26 14:04:58
I find that in various situations Objective-C code in Xcode 3.1 (Leopard) can fail to get appropriate syntax coloring after typing or lose coloring that it had. This isn't just a "refresh" issue with new custom symbols -- but affects Cocoa framework symbols as well. Sometimes CMD-a to select all text on the code page will make the coloring (re)appear, sometimes double-clicking on a line to select it will work, sometimes I have to add/delete a space in a symbol to get that symbol to (re)color. Rebuilding, or closing/reopening the project may or may not work. Is this a known issue with Xcode?

Copy Notepad++ text with formatting?

半世苍凉 提交于 2019-11-26 12:49:45
问题 I\'m using Notepad++ to write code. How do I copy code in Notepad++ along with its formatting to paste into Microsoft Word? (i.e. syntax highlights, etc) 回答1: Here is an image from notepad++ when you select text to copy as html. and how the formatted text looks like after pasting it in OneNote (similar to any other app that supports "Paste Special"): 回答2: Taken from here: You can use Notepad++ to accomplish this in three ways. Just so you know, Notepad++ is a more advanced version of Notepad,

class & function names highlighting in Vim

风格不统一 提交于 2019-11-26 12:34:52
问题 I just recently set up my Vim environment from Textmate, after becoming addicted to its modal input. However, syntax highlighting seems to be not so beautiful in Vim. I code in C++ and since the function call and class names can\'t be highlighted, the code is more difficult to read. I played with color scheme for a bit, but couldn\'t find any field that corresponded to \"class name\" or \"function name\". In the picture below, notice how DroughtLayer:: and *.size() is not highlighted on the

Free/open source code editor UI control for .Net [closed]

半腔热情 提交于 2019-11-26 12:10:57
问题 I\'m looking for a free , syntax-highlighting , possibly autocompleting \"Programmer\'s textbox\" style control for use in a Visual Studio Windows Forms or WPF project. It should work with C# and self-defined languages, and the licence should permit its use in a closed, in-house development tool. There are pay-for solutions available - something like http://www.syncfusion.com/products/user-interface-edition/windows-forms/Edit would work fine - but I am looking for something simpler, and would