пятница, 14 июня 2013 г., 2:20:45 UTC+4 пользователь Yakov написал: > > Hi Mario > > четверг, 13 июня 2013 г., 3:59:25 UTC+4 пользователь PMario написал: >> >> On Wednesday, June 12, 2013 10:05:38 PM UTC+2, Yakov wrote: >>> >>> Two more things. First, I've got a problem with the indents. Most likely >>> it's a CodeMirror bug, but still.. I've changed my tabSize for JavaScript >>> to 8. Now I've got 4 spaces instead of 1 tab here and there. An example: I >>> create a tiddler, set its content-type to "text/javascript", type >>> >>> function a(b,c) { >>> var d = b; <- here I have tab, not spaces - this is changed by >>> google.groups >>> } >>> >> >> As described in the CodeMirrorConfig: Global section if you use >> indentWithTabs: true. tabSize and indentUnit have to be the same value, >> otherwise you'll get strange behaviour. >> >> indentWithTabs: true >> tabSize: 8 >> indentUnit: 8 >> >> I did test this and it works. >> >> tabSize: 8 >> indentUnit: 4 >> >> this doesn't work. >> >> Ah, thanks, now it works :) > > This is by intention. 2 reasons. >> >> a) I did test it with highlighting every pipe sign but it was very >> distracting. I didn't like it. >> b) the code to highlight it is much easier :) >> > > I see. May be in this case it's more useful to highlight the whole line > with some background-color? Anyway, adding a class to the whole line > shouldn't be more difficult than to the first pipe. Also, different classes > can be added to the caption line, class line, header line and ordinary > content lines which can be of use, too. (let us know when you introduce > some updates to the tiddlywiki.js; or may be there's an automatic way to > keep track of the updates?) > > Hey, there's more: it would be *really* useful if odd and even table lines are highlightened differently -- it would ease working with big tables considerably. Though, I guess that will rise some difficulties in implementation (the engine should take a look at at least previous line).
> > 4 spaces in view mode actually is a bug, the CodeMirror.runMode() function >> doesn't get the options object. May be I forgot it, since I use tabSize:4 >> and the default is tabSize:4 :) >> >> Having a look a the runmode.js source, it will allways convert tabs into >> spaces, since the codemirror author programmed it that way. (btw: he seems >> to hate tabs in code) >> > > Honestly, I didn't get if that's a CodeMirror bug, or plugins' bug, or you > haven't figured yet :) > > By the way, what do you think about my hijacks? Will you include them to > the plugin? > > Best regards, > Yakov. > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/groups/opt_out.