TextMate: Added custom syntax highlighting does not appear in list, so cannot be selected - syntax-highlighting

I tried to load the Mozaic syntax highlighting into TextMate. While in fact I could create a new Bundle and load the file...
...it doesn't appear in the list of bundles, so I can't activate it. I tried restarting TextMate, but doesn't help.
Anyone having an idea what's going on?

After installing the theme and restarting TextMate* the theme is available through the "View" menu, under "Theme", it is listed as "Monokai-Mozaic".
*: I didn't check for the theme before restarting, this may be optional.
You can also use the "Select Bundle Item" search (cmd + ctrl + t) and select the "other tab" to search through your themes and quickly select them.

Related

Textmate, how to find out which theme I am using?

I am using TextMate version 2.0-alpha.9387, I don't see any options in Preferences.
The answer is select View->Theme from menu bar. But I think textmate 2 has bug on that menu item, the menu item is grey and not selectable, I have to make selection of text that I am editing to enable the menu item.
Start with an open document
Keyboard:
Ctrl + Command + t, begin typing variable, when "Show TextMate Variables - Bundle Development" is selected, press return.
Mouse:
Bundles → Bundle Development → Show TextMate Variables
Results:
This displays a large tooltip listing all the environment variables available to the TM, you're looking for "TM_CURRENT_THEME_PATH". The theme name is the same as filename in this path.
Bonus:
You could create a snippet for this as well:
Snippet/Command:
${TM_CURRENT_THEME_PATH}
in a snippet with a tab trigger of theme would cause the path to replace theme with the path.

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.

How do I activate the Zen coding key bindings in Sublime Text 2?

I just downloaded the Zen coding package for Sublime Text 2, but I can't figure out how to activate it.
I already have it in Netbeans, and here you just have to press CTR+ALT+N, but this doesn't work in the Sublime editor.
Google didn't yield any results, so I'm asking here.
Can someone tell me how to activate the Zen coding function?
press Ctrl+Alt+Enter and you'll get a text input box at the bottom of the screen, titled: Enter Koan:. as you type the zen expression into the box it will simultaneously unfold on the screen.
Alternatively, you can type the zen expression in the editor and press tab to expand it. Be sure not to leave any spaces inside the expression or after it.
I have been using Sublime Text 2 beta, build 2139 on Windows (but I'm also pretty sure this should work on Mac OS and Linux too) and here's how I got it to work:
After installing Sublime Text 2 itself, install Package Control
for Sublime Text 2. This is an add-on that allows you to easily
manage another add-ons.
I couldn't get the first installation option to work so I went for
the manual method. On my installation there was no folder called
"Installed packages", instead I've used "Pristine Packages" folder
which seemed to contain other, already installed extensions.
Restart Sublime Text 2
With Package Control installed open Sublime Text 2 editor and choose Preferences -> Package Control -> Package Control : Install Package from the menu. Hit "Enter" and there should be a list of packages available for installation displayed on the screen. Start typing "Zen" and Zen-Coding will be presented. When selected hit "Enter" again, status bar on the bottom of the screen will be showing installation progress.
When it's done - restart Sublime Text 2 one last time. Now, you can expand Zen-Coding abbreviations with 'ctrl+space' or 'tab'.
Remember it will only work in the saved file, with extension "html". (in particular - it won't work on the new document you've just created).
I hope this helps
To expand your zencoding, just press TAB. However, for a full list of all the keybindings, look in your Zencoding folder for a file called "Default (NAME_OF_YOUR_OPERATING_SYSTEM).sublime-keymaps". To get to the package, go to "Preferences > Browse Packages > zencoding".
Ctrl + Opt (Alt on a PC) + Enter. Check out the video.
See this post : Zen coding downloading trouble
and my comments for detailed instructions.
Also, after an upgrade, just replace the folder with the original one from
http://dl.dropbox.com/u/1292831/ZenCoding.zip
Good Luck ..
Download this one; https://github.com/sergeche/zencoding-sublime
It works on SublimeText2 2.0.1 build 2217 windows.
After install Emmet package, remember to restart sublime editor and save a file first to try it!. I thought it wasn't working after install, but it just needs a saved file to work on it.

Aptana Studio 3 - Syntax highlighting for Handlebars files

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.

How to set an external editor in Xcode 4.2

All the posts I have found suggest going to the "file types" sub-section under XCode preferences and adding an external editor for a specific file type. However this options does not seem to be there on XCode 4.2.
It looks like it just goes through LaunchServices, so... whatever you'd get by opening it using Finder by default.
I had a look around and I couldn't figure it out. I notice that right-clicking on a source file, there is a greyed out option for "open in external editor." I couldn't figure out how to get that working at a glance.
A reasonable workaround would be to right-click on the source file you want to edit, click "Reveal in Finder," and then edit the file in the editor of your choice. The changes will be automatically updated in Xcode. I think you'll lose any undo/redo history you may have had for that file in Xcode though.
you have to make the editor you want is the default editor for the file type(cpp/h/lua ..).
step: first time you 'show in finder', then open the file with 'open as', then choose the editor you want, make sure you choose the 'always open it'. then every is ok now.
I agree that you need to change the default setting for the file type in Finder. The best way to do that is to right-click any similar file in Finder. Select Get Info from the pop-up menu. Then look down the list for the "Open with" drop-down option. Select your chosen editor and then below the words "Use this option to open all documents like this one" click on "Change All..."
Then it will change the default for all your applications.

Resources