On Sep 5, 12:19 am, Yakov <[email protected]> wrote:
> This is really amazing. ..
thx:)
> .. I'm just starting to learn development for TW
> and I always though: "hey, TW could be a very nice tool for coding:
> look at this fine hypertext structure, no need of this linear mess!".
> And this can actually bring a new age of coding (for TW) -- I mean,
> when TW becomes ready to be the _main_ tool for coding.
The main tool for TW coding is a little bit hard to achieve, since IMO
it would need a "real time" syntax checker too. But it's a good
strart :)
> Not much to say about the highlightning -- it is great, although in
> the cmEdit mode it's poorer than in the view mode (especially for
> CSS).
jup ... since edit mode is hardcoded to "javascript" mode at the
moment, for every tiddler. (It's alpha :))
> Actually, I haven't understood the thing about those tags and fields
> in a)-d). Do you mean that you want to figure how to declare in which
> mode the highlightning should be used (XML, CSS, JS or Python)? ...
If a tiddler is tagged "systemConfig" it deffinitely is a plugin. TW
plugins are allways "javascript".
"systemThemes" I use a lot, becuase theme switchers use it to identify
themes. themes will be "xml" or "html mixed"
....
> ... I
> think it can be set on user to decide (just make some settings so that
> one can choose which tag/field defines each mode). ...
I did some more thinking allready, to use the given UI.
Since CodeMirror has a lot of config options [1] I was thinking about
a config tiddler like this:
! global
enterMode: keep
indentWithTabs: true
lineNumbers: true
matchBrackets: true
! javascript
content-types: text/javascript application/json
tags: systemConfig anOtherTagThatActivatesJS
mode: javascript
! xml
tags: systemTheme aTagThatActivatesXML
mode: xml
...
The plan is, to have the following rule, for determe the tiddler edit
type.
The higher number wins:
1) (tiddlyspace) server.content-type: text/javascript
2) (tiddler field) content-type:
3) (tiddler tag) eg: systemConfig
> ... As for the mixed
> mode, aside elaborate templates (like in TiddlyTools) it seems that
> usually the only need for mixed mode which happens in TW is CSS + JS
> in the same plugin tiddler, isn't it?
Mixed mode will be low priority, since we'll need to see what's
needed ...
> Some side notes:
> * if it is possible to read the core code of TW highlighted within TW
> it adds more perspective for development (I mean, this would introduce
> more explorability of the core, although cooked TW is less readable
> than separate .js files)
That's why I think, you should fork and download tw from github, and
use a "native" source editor, for this.
> * I have no idea why Python is here? Do you intend to use TW as a
> development tool for Python?
TiddlySpace is written in Python and I needed a language, that is not
"default" to different type of TW code indicators.
eg:
{{{ ... text
//{{{ ... code
python needs <code class"python">..</code>. So it's just to test the
new formatter. There are a lot of "alien" languages supported by
CodeMirror and it should be possible to highlight all of them with
TW :) See "Suported Modes" [2]
-m
[1] http://codemirror.net/manual.html#config
[2] http://codemirror.net/
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywikidev?hl=en.