syntax-highlighting

HTML syntax highlighting in javascript strings in vim

感情迁移 提交于 2019-11-28 10:26:23
I don't know if this is possible/sensible, but I was curious to know if I can have my strings in javascript files have html highlighting. I discovered that strings in php could have SQL syntax highlighting, so I believe it is possible. But, I don't know vim-scripting, so any help on this appreciated. I am using the Better Javascript syntax . PS: If there could be an option to turn it on and off while editing a js file, that would be wonderful Thanks Yes, it's possible if you don't mind some syntax file hacking. First you need to include the HTML syntax file from within the Javascript syntax

Adding syntax highlighting to programming languages in Xcode 4.0

非 Y 不嫁゛ 提交于 2019-11-28 07:19:45
Does anyone know if it's possible to add custom syntax highlighting to Xcode 4? In Xcode 3 you just had to add some files in: ~/Library/Application Support/Developer/Shared/Xcode/Specifications/ but that does not seem to work anymore? XCode syntax coloring for lua https://github.com/bastos/lua-xcode-coloring I haven't tried that, but I think it's worth trying the following (at least on XCode 4.3): 1 - Go to /Contents/OtherFrameworks/DevToolsCore.framework/Versions/A/Resources/ inside the XCode package; 2 - Find the files "Built-in file types.pbfilespec" and "Standard file types.pbfilespec"; 3

Vim syntax coloring: How do I highlight long lines only?

廉价感情. 提交于 2019-11-28 06:54:05
I would like vim to color "long" lines for me. Using 80 columns as an example, I would like to highlight lines that exceed that length. Here is roughly what I think the .vimrc file should contain, although it (1) doesn't work, and (2) uses Perl's regex syntax to illustrate my point, because I don't know Vim's well enough: ... highlight Excess ctermbg=0 au Syntax * syn match Excess /.{80,}$/ ... This (in my mind at least) should mark lines that exceed 80 columns. What I would ideally like is the ability to color only the part of the line that exceeds 80 columns, so if a line is 85 columns, then

How to handle multi-line comments in a live syntax highlighter?

与世无争的帅哥 提交于 2019-11-28 05:58:35
问题 I'm writing my own text editor with syntax highlighting in Java, and at the moment it simply parses and highlights the current line every time the user enters a single character. While presumably not the most efficient way, it's good enough and doesn't cause any noticeable performance issues. In pseudo-Java, this would be the core concept of my code: public void textUpdated(String wholeText, int updateOffset, int updateLength) { int lineStart = getFirstLineStart(wholeText, updateOffset); int

how to highlight search results

梦想的初衷 提交于 2019-11-28 05:50:59
问题 hello i have a search function in that i will search a db for keywords. i would like to highlight the keywords and found a second function that i would like to implement into my search function. so i have this code for the search: <?php function searchText($keywords){ global $db; $returned_results = array(); $where2 = ""; $keywords = preg_split('/[\s]+/', $keywords); $total_keywords = count($keywords); foreach ($keywords as $key=>$keyword){ $where2 .= "`column` LIKE '%$keyword%'"; if ($key !=

Autocompletion in ACE editor

◇◆丶佛笑我妖孽 提交于 2019-11-28 04:21:13
I've found simmilar question: Ace Editor autocomplete and multiple languages But the responses were that autocompletion is not supported by ACE, and according to Google group for Ace Editor "It is on my wishlish for Ace and we definitively need it for Cloud9". This post is one year old and as you can see, the cloud9 supports autocompletion now: https://c9.io/site/features/ So is autocompletion available in Ace Editor by default? I cannot find any information about it. Autocomplete is now an official part of the API. Enabling it takes 3 lines of code: ace.require("ace/ext/language_tools"); var

Change / Add syntax highlighting for a language in Sublime 2/3

不羁岁月 提交于 2019-11-28 03:22:03
I want to change / add syntax highlighting for a language in Sublime 2/3. For example I want the keyword this colored in JavaScript. How can I do that? I know that there is a preference JavaScript File in C:\Program Files\Sublime Text 3\Packages , but I don't know what to change or if I have to create a new JavaScript Preference File somewhere in this folder %APPDATA%\Sublime Text 3 . Syntax highlighting is controlled by the theme you use, accessible through Preferences -> Color Scheme . Themes highlight different keywords, functions, variables, etc. through the use of scopes, which are

How can I enable auto complete support in Notepad++?

巧了我就是萌 提交于 2019-11-28 02:54:41
I am trying to add simple syntax highlighting and auto completion for a simple scripting language... I added syntax highlighting using this article Now I want to know how to enable auto completion with Notepad ++ for my custom language. Does anyone know how to do that? Mark For basic autocompletion, have a look at the files in %ProgramFiles%\Notepad++\plugins\APIs . It's basically just an XML file with keywords in. If you want calltips ("function parameters hint"), check out these instructions . I've never found any more documentation, but cpp.xml has a calltip for fopen , while php.xml is

How do I edit the Solarized (Light) theme in Sublime Text 3

强颜欢笑 提交于 2019-11-28 02:53:49
I am trying to edit some of the syntax colours in Sublime Text 3. I'm using the Solarized (Light) built in colour scheme but I only want to change a few of the colours. Where is the settings file (on a Mac)? skuroda I'd recommend using PackageResourceViewer to open the file. You could make your modifications there, and it would save in the proper location to override the built in files. However, I would recommend copying the contents of the file and creating a custom version in your User folder. That way, you can easily move it around and modify it without worrying about the built in color

How to manually set language for syntax highlighting in Visual Studio Code

☆樱花仙子☆ 提交于 2019-11-28 02:44:18
Before the confusion begins, this question is about Code, the new lightweight Visual Studio Editor. You can get it from here: https://code.visualstudio.com/ I have a textfile (.txt) with CSS in it and want to get syntax hightlighting. You can open the command palette with ctrl + shift + p . But there you can not set syntax like in Sublime. Is there any other way to get the CSS coloring in from my textfile? In the very right bottom corner, left to the smiley there was the icon saying "Plain Text". When you click it, the menu with all languages appears where you can choose your desired language.