Aptana Studio 3 - Syntax highlighting for Handlebars files - syntax-highlighting

How do I get Aptana to apply the same syntax highlighting and auto-complete that exists on .html files to my files that end in .handlebars?
I'm assuming there must be some setting in Preferences to allow this, but I'm not seeing it.
If it helps, I'm using version 3.0.7.2011

Ok, recently figured this one out.
Under Windows > Preferences select General > Editors > File Associations.
Here, you can simple add whatever extension you want, then the editor that you want to apply it to.
Here's a screenshot:
After you click "Ok" you will have whatever syntax highlighting or code completion that the editor you specified has.

Related

How to turn on matching braces VS 2017

I just installed VS 2017 but I can't seem to get matching braces turned on. I tried changing colors in the tools editor but that didn't work. Not sure what I did to turn this off.
OK, for some reason its only for JavaScript files. If this happens to you, go to Tools > Options > Text Editor > JavaScript/TypeScript > Language Service and uncheck the Enable the new JavaScript language service. If you have any JavaScript files open at the time you do this, you will need to close and then reopen them.

Sublime MarkdownEditing plugin color scheme and line numbers

I like to utilize Markdown for a lot of the text that I write. To that end I wanted to try out the MarkdownEditing plugin for Sublime Text 3, but am having some user experience issues:
I cannot figure out how to change the color scheme such that it affects the MarkdownEditing syntax editor. Changes to .Packages\User\Preferences.sublime-settings do not effect display settings when in this syntax highlighting mode. However, those changes are reflected in other tabs. How do I change the color scheme when making use of the MarkdownEditing syntax highlighting?
How do I turn on line numbers when making use of this syntax plugin?
TL;DR
If you are using Markdown GFM syntax, open/create "Data/Packages/User/Markdown.sublime-settings" and add:
{
"color_scheme": "Packages/your/custom.tmTheme",
"line_numbers": true
}
See menu: Preferences > Package Settings > MarkdownEditing.
There are 3 different settings there for 3 different syntaxes. First check what "default" settings does and then undo it in "user" settings.
To stop the MarkdownEditing package from overriding your color scheme on Markdown files:
Open Preferences > Settings - User
Find your color_scheme line - e.g. it looks like
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
Copy the entire line
Open Preferences > Package Settings > Markdown Editing > Markdown GFM Settings - Default
Comment out the other color_scheme lines by adding // in front of them
Paste your line instead
Save the file
Markdown files will now use your regular color scheme rather than using their own scheme just for .md files.
If you get an error about "Error trying to parse settings", make sure your line ends with a , if there are lines below it, and does not end with , if it is the last line.
This was one of the most annoying things about this plugin when I installed it a while back, so I promptly got rid of it. However, before doing so, I figured out how to solve your problems. First, since you're using ST3, you'll need to install the quite-useful PackageResourceViewer plugin. Open the Command Palette (CtrlShiftP on Windows), type in prv to bring up the PackageResourceViewer options, and select Extract Package. Scroll down and select MarkdownEditing, hit Enter, and you're all set. You can now open Packages/MarkdownEditing (Packages should be in C:\Users\username\AppData\Roaming\Sublime Text 3, also available by selecting Preferences -> Browse Packages...) in the sidebar and browse through all the different .sublime-settings files for the different syntaxes and for the main plugin, changing things as you want. The syntax-specific files use all the same options found in Preferences -> Settings-Default, so for example you can set "line_numbers": true to turn line numbering back on, and change the value of "color_scheme" to your preferred value.
I had another packaged named Markdownlight which was overriding the color scheme. I had to uninstall it before the color_scheme in the MarkdownEditing user settings took affect.

Aptana Studio 3 Slim support

I am use Aptana Studio 3 for Ruby on Rails development. The project I am working on uses Slim (http://slim-lang.com/). I was hoping to find editor and formatting support for the slim file type. So far my Google search have some up empty.
It could be a poor solution, but Sublime (http://www.sublimetext.com/) have a template for Slim. Using the Package Control (https://sublime.wbond.net/) you can install it easily.
This isn't perfect, but you can get HAML syntax highlighting for slim files in Aptana Studio:
Open 'Preferences' (on Mac under 'Aptana Studio 3)
Goto 'General' > 'Editors' > 'File Associations' (or search for 'File Associations')
Click 'Add...' to add the '*.slim' file type
With the '*.slim' file type highlighted, select 'HAML Editor' from the list of 'Associated editors'
This at least gives you syntax highlighting for strings, symbols, some keywords (if, yield, etc.), and HTML id's and classes.
The bigger win for me is that the HAML Editor uses the better built in search that allows you to search the current file, open files, enclosing project, or the entire workspace. Before making that change a much more limited search was the default for slim files.

Ruby colon hash syntax highlighting

I'm a pretty heavy user of colon hashes but the default Aptana Studio Ruby doesn't provide any highlighting for them.
Here's a colon hash in Ruby 1.9:
{ animal: "duck" }
Does anyone know what bits I need to punch to make the "animal:" part display in another colour?
Update:
It seems from reading the source that the PLists file isn't being used by Aptana and that the feature is presently incomplete.
https://github.com/textmate/ruby.tmbundle/issues/17
I've tried changing the scopes in source but it doesn't seem to update for me.
To find the scope Aptana is trying to highlight
Commands -> Bundle Development -> Show Scope and Matching Theme Rule (alternatively the default shortcut is Ctrl+Alt+P)
Read the box. It may list several scopes.
The way you add a scope:
Window -> Preferences
Select Aptana Studio then the Themes option.
Press the + button next to the Scope Selector textbox.
Add your scope and set the colours.
Apply and click OK
I'm all out of ideas. Hopefully this will help someone get closer.
Aptana Studio 3 uses TextMate themes for syntax highlighting, so you just need to find a TextMate theme that supports it.

What is this colour scheme element?

I'm using VS2010 with ReSharper and "Son Of Obsidian" theme and have the following frustrating highlighting issue in String.Format sections.
Selecting a method (or any) parameter gives the grey background - see string bString in picture. But the highlighting inside the String.Format string is different, and unreadable.
In "Tools > Options > Font and Colors" I've tried: "Selected Text", "Inactive Selected Text" and "Highlighted Reference" both in vain.
So please:
a) What do I need to change
b) Is there a decent way of finding it out (I've tried doing a screen grab for the Hex color code and searching for that in the style XML, but that doesn't work)
After an age of trying this out on my home PC I've discovered the element in question is ReSharper Matched Format String Item
There should really be an easier way of finding this stuff out
It appears your cursor is in an Intellisense Code Snippet field.
Could it be Code Snippet Field?
Paddy's reply pointed me in the correct direction, but my issue was slightly different. I'm going to post my solution here in the hope that it might help others.
I'm using VS2013 and Resharper 8. My issue was that Resharper had not been able to import it's own Font and Colour settings on installation. For me, the Resharper options shown in Paddy's image were not visible. This is a known issue with Resharper installation and the solution is as follows:
1) Close all Visual Studio instances
2) Open C:\Program Files (x86)\Microsoft Visual Studio {VS version}\Common7\IDE\Extensions\extensions.configurationchanged file
3) Type anything there
4) Save the file
5) Open VS and check Fonts and Colors in Tools | Options | Environment
(source)
For me, as soon as I reopened VS, Resharper had been able to import its own settings and the highlighting issue was already fixed without needing any further action from me.
Now, when trying to edit the extensions.configurationchanged file, I also ran in to an "Access is Denied" error message (I'm running Windows 7 as an admin). To overcome this I had to open Notepad as an administrator (Start > right click notepad > Run as administrator) and then use File > Open to open the extensions.configurationchanged file.
I hope this helps people in the future!

Resources