Hi folks
I switched to Sublime 2 about a week ago after years of using BBEdit. I’m really enjoying the simplicity, the speed and the powerful features and plugins.
I’ve customized a lot, gotten used to certain things, but some questions remain. If you can answer any of them, I would be very happy .
1. Auto completion
When typing something like $(’ sublime automatically appends ') after the cursor, which is great. After I type my selector $(’.my_selector|’) (I marked where the cursor is red) - I still have to type either ') or super+→ to get the end of the line and continue writing, which kind of defies the point of autocompleting that statement in the first place (since I have to type it out anyway to keep going).
I would expect hitting tab to take me to the end of the line, but that doesn’t work. Is there some shortcut to do this (get to the end of the line in this situation)?
2. Auto indentation
I like the auto-indentation, but it doesn’t play nice with our company’s coding conventions.
Example:
[code]function foo()
{
do_something();
var o = {
something: ‘else’,
b: true
};
}[/code]
Writing something like this is problematic with Sublime Text:
function foo()
{
| <- this is where cursor is placed by auto indentation
| <- clicking an empty line within the function places the cursor here
| <- but this is where I would like it in both cases
}
Is it possible to customize this more granularly? I do not want to disable auto indentation alltogether. But this requires me to hit backspace everytime I write a new function or object. This is really bugging me, any help would be greatly appreciated. Even if I have to go hack the code somewhere to achieve this. I think an option like tab_size_within_structures: 0 is what I’m looking for.
3. Expand selection to scope
The shortcut super+shift+space is very handy. I would like it more if it would select the contents of quotes without the quotes though. So in this string ‘this is a string’ it would select the whole string with the quotes, instead of just this is a string. Is this possible?
4. Map file endings to syntax
In some cases, you want different syntax highlighting than Sublime automatically chooses. In BBEdit, you could map file endings to syntaxes globally, and if you changed it manually within a project, that setting was saved for the project workspace. For example I usually want JavaScript highlighting for .json files (instead of the default JSON highlighting). Is their any way to map this? Wouldn’t it make sense to store manual overrides in the project workspace?
5. Syntax highlighting
For some reason, in PHP files, keywords are also highlighted within docblocks and some quotes. Example:
[quote]/**
-
@param string Foo
*/[/quote]
@param is in a comment block so it shouldn’t be highlighted imho. Can I change this somehow? In large PHP files it gets distracting when the comments are all highlighted up.
6. Code completion
Is it possible to write custom code completion files? I would love to extend e.g. the JavaScript code completion with the standard JS functions (e.g. getElementById()) or the jQuery methods. So if I type $.add, Sublime would suggest addClass to the list of names it suggests.
Thanks for any help on any of these issues!
Chris