> would *love* to see it in Sublime Text
Awesome!
> curious to hear if this is even possible, given Sublime's API
I haven't looked into Sublime's API yet but I've heard it's pretty decent. Xiki has kind of an insane number of features that do all kinds of disparate things. It might be helpful to scope a first version to, for example, the stuff shown in the "Can your shell console do this?" screencast:
http://www.youtube.com/watch?v=bUR_eUVc ... r_embeddedMost of the hard work for what's in the screencast can be handled by the 'xiki' shell command that gets installed when you "gem install xiki". For example, you can have ruby code invoke the shell command "xiki tables" and then just dump the text that is returned straight into the Sublime window.
There'd primarily be one keyboard shortcut (does Command+enter or Control-enter currently do something in Sublime?) that would need to pass control to a Sublime Xiki plugin. Also, for files that have a ".notes" extension, when the user double-clicked anywhere control would need to be passed to the plugin. Once the ruby code for the plugin had control, it would need to be able to:
- know where the cursor is
- read, delete, and insert at arbitrary parts of the text in the Sublime window
- prompt the user to enter text
- read one character of input at a time from the user
- without giving up control
The plugin would grab the line from the Sublime window (and possibly some surrounding text), pass it to the 'xiki' shell command, and insert the results into the Sublime window (indented 2 spaces deeper). Then it would prompt for characters from the user to implement the incremental search. (It would delete the text and insert a filtered-down version for each character a user typed).
Once that were achieved, Sublime users would be able to add a "foo.rb" file to their ~/menu/ dir. Then they could type "foo" on any line and double-click on it (etc.) to activate it and browse its menus. This would allow creation of plugins in just a few lines of code, which could do a pretty decent job of accessing and controlling external tools / apps, so long as nothing graphical were required in the UI itself.
The coloring is optional, but I'm guessing since sublime can colorize many different formats, this wouldn't be an issue.
--Craig