syntax-highlighting

UITextView attributedText and syntax highlighting

自古美人都是妖i 提交于 2019-11-30 13:05:48
问题 Background So, with iOS 6 an UITextView can take an attributedString, which could be useful for Syntax highlighting. I'm doing some regex patterns in -textView:shouldChangeTextInRange:replacementText: and oftentimes I need to change the color of a word already typed. I see no other options than resetting the attributedText, which takes time. - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text { //A context will allow us to not call

Custom syntax highlighting in Geany

对着背影说爱祢 提交于 2019-11-30 12:34:56
I am trying to create custom syntax highlighting for Kivy '.kv' files in the Geany editor. Although the specific filetype seems irrelavant to the issue I'm having, as any efforts I make at getting syntax highlighting to work for a custom filetype results in a completely non-highlighted file. I believe I have done my homework on this, and nothing seems to work. I have added the following to ~/.config/geany/filetype_extensions.conf Kivy=*.kv; I also have a custom type definition file named 'filetypes.Kivy.conf' in ~/.config/geany/filedefs/. I have tried basing this file off several of the stock

c# - perfect syntax highlighting [closed]

試著忘記壹切 提交于 2019-11-30 11:31:02
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 11 months ago . I'm looking for a RichTextBox with syntax highlighting! Sounds easy but I'm searching since months and didn't find that what I need. First I started to do it by myself... No good idea... I tried to use this: http://blogs.microsoft.co.il/blogs/tamir/archive/2006/12/14/RichTextBox-syntax-highlighting.aspx but

Highlighting kills my Razor syntax in Visual Studio 2010

走远了吗. 提交于 2019-11-30 11:17:47
I'm using Expression theme in Visual Studio 2010 Ultimate on Windows 7 operating system. ( Note : Actually, I'm not sure this problem occurs because of the dark theme) A few days ago, I decided to learn ASP.NET MVC 4 and tried to create a small web application. In Visual Studio, I followed this instruction and created a new asp.net mvc 4 web application: File->New->Project->ASP.NET MVC 4 Web Application. Everything was perfect. But when I opened the Login.cshtml file, I couldn't even see the razor syntax (expressions which started @ ) because of highlighting. Take a look: Even if I select all

CodeMirror HTML mode not working

£可爱£侵袭症+ 提交于 2019-11-30 10:53:57
I'm trying to style code samples with CodeMirror, but it works partially - it applies the selected theme to the textarea but the syntax is not highlighted. There is my page: <textarea id="template-html" name="code" class="CodeMirror"> <!DOCTYPE html> <foobar> <blah>Enter your xml here and press the button below to display it as highlighted by the CodeMirror XML mode</blah> <tag2 foo="2" bar="bar" /> </foobar> </textarea> <link rel="stylesheet" type="text/css" href="/site.com/css/codemirror/codemirror.css"> <link rel="stylesheet" type="text/css" href="/site.com/css/codemirror/theme/ambiance.css

IDE with syntax highlight support for LESS

对着背影说爱祢 提交于 2019-11-30 10:53:24
Is there any IDE with syntax highlight support for LESS ? Eclipse does not support .less fully (nested rules, single line comments, etc) but you can at least configure it so that it would open .less files and treat them as .css. Preferences > General > Content Types: find "CSS" entry and add .less extension. Then, Preferences > General > Editors > File Assoc: add .less extension and associate with CSS editor. Better than nothing, especially if you're into Eclipse world ;) JetBrains PHPStorm has built-in support for LESS :) You could use Netbeans plugin for LESS. In Netbeans 6.9: tools->

In vim, how do I highlight TODO: and FIXME:?

℡╲_俬逩灬. 提交于 2019-11-30 10:19:26
问题 In vim, FIXME and TODO are highlighted, but I can't get FIXME: and TODO: (note the colon after the keyword) to highlight? What should I put in my .vimrc to make this happen? 回答1: Well, you've already found the problem, but here's the why. There are three basic types of syntax matching: keywords, matches, and regions. Keywords are fixed strings, generally used for basic language keywords ( int , double , ...) and also, in your case, for the FIXME and TODO. I really do mean fixed strings; they

NSTextView syntax highlighting

让人想犯罪 __ 提交于 2019-11-30 10:18:10
问题 I'm working on a Cocoa text editor which uses an NSTextView. Is it possible to change the color of certain portions of the text? 回答1: You should add your controller as the delegate of the NSTextStorage object of the NSTextView ( [textView textStorage] ) and then implement the delegate method ‑textStorageDidProcessEditing: . This is called whenever the text changes. In the delegate method you need to get the current NSTextStorage object from the text view using the -textStorage method of

Eclipse syntax highlighting preferences save and restore

耗尽温柔 提交于 2019-11-30 10:04:17
问题 I spend some time customizing the colors for syntax highlighting in Eclipse (Java, JSP, HTML, CSS, etc.) but whenever I try to export these settings via File|Export|General|Preferences and reimport them, the settings never completely get imported back. Some colors are restored and others are left unchanged, leaving me in an 'in between' state - very frustrating. I'm using Eclipse 3.4 Ganymede, by the way. Has anyone found a reliable way to save and restore Eclipse syntax highlighting settings

Syntax Highlighting library in ActionScript

泄露秘密 提交于 2019-11-30 09:48:29
I let user enter some code in my Flex3 (Flash 10) app and I want to do syntax highlighting. Is there any open-source library that would help me? I'll need a Lua syntax support, but I can add it myself if library has a resonable interface to do this. Swaroop C H Update on 21 Jan, 2009: Check out Anirudh's port of google-code-prettify to ActionScript3 , it has a very good example app as well. I guess this wasn't even feasible till now. With the new Flash Text Engine , maybe such text-based features will start showing up, and hopefully open source libraries that work like the FlashEff library. I