Kodi Community Forum

Full Version: Sublime Text 2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Anyone uses this one for coding? Just downloaded it and it works a lot better imo then notepad++.
Already started with a custom autocompletion file for xbmc, which works great.

Can be downloaded here:
https://github.com/Amelandbor/XML
I've posted my XML.sublime-completions file on http://pastebin.com/5fem4rqW .This one is located in C:\Users\$USER\AppData\Roaming\Sublime Text 2\Packages\XML

And this is in my User settings file.

Code:
{
    "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
    "auto_complete_triggers": [ {"selector": "text.xml", "characters": "<"} ]
}

Autocompletion will open with typing a <.
I've just had a quick play with it - it's nice and easy on the eyes - and I like the sound of the auto-complete feature but don't know yet if we can use it for XBMC style controls.
I've edited my post because the pastebin url was wrong.

What do you mean by:

(2012-10-13, 17:04)Hitcher Wrote: [ -> ]I like the sound of the auto-complete feature but don't know yet if we can use it for XBMC style controls.

When typing <control you get a list of all the types for easy selection.

PHP Code:
<control type="label" id="1">
<
control type="image" id="1">
... 
(2012-10-13, 12:32)Amelandbor Wrote: [ -> ]I've posted my XML.sublime-completions file on http://pastebin.com/5fem4rqW .This one is located in C:\Users\$USER\AppData\Roaming\Sublime Text 2\Packages\XML

What should this be saved as?
As XML.sublime-completions

And I haven't found a solution for control to get multiple selections, but it is possible.
Cheers, auto-complete is great. Big Grin
I have a workaround for the control issue. You can type the first (or two) letter and it will autocomplete the word. I would like to see a dropdown list with all available tags but I think that would need some python coding.

Here is the new completions file:

https://gist.github.com/3888542
@ Hitcher: perhaps adding a link to this in your "Skinning for beginners" thread?
cheers
Done.
autocompletion is very nice! rep+.

thanks.
I created a repo on github for the autocompletion file. Let me know which tags you want to have added to the list.
Updated at Github, added
Code:
"Container.Content(tvshows)", "Container.Content(seasons)",     "Container.Content(episodes)", "Container.Content(movies)"
The autocomplete list for these will only appear if you hit CTRL+Space.
Thanks.
Pages: 1 2