[rkward-devel] idea: code readability

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Mon Nov 7 19:37:45 UTC 2011


Hi,

On Monday 07 November 2011, meik michalke wrote:
> some less intrusive changes could probably be done immediately:
> 
> - RKWard should completely skip all empty JS functions (that is, not print
> "## Foo" then, since there is no foo to come)

ok, done. Unfortunately, this causes false positives in virtually all of the 
tests. Can you come up with a clever sed command to adjust all test standards, 
accordingly?
 
> - i'd prefer the code always to be shown from its top, not its end. the
> need to scroll up is a bit counterintuitive

Ok, done. The code now tries to keep the current scroll position across 
display updates (or actually, since katepart has no API to allow that, it 
tries to keep the current cursor position), and defaults to top / left, 
instead of bottom scroll.

> - not completely sure about this one, but i could do without seeing the
> "local({<code>})" in the code window, just the "<code>" would be fine

I can see the point, but I am reluctant to do this, as it will mean, 
carelessly copying code from the code display may litter the workspace with 
temporary variables (and even overwrite user data).

Ideas?

> by disappearance i only meant like "invisible". the most preferable option
> for this would be the code folding feature of kate, which still enables
> you to copy & paste all of the code, even if currently you don't see it.
> can the default folding be defined, e.g. by
> KateCodeFoldingTree::applyFoldingState() or so?

Two problems in getting there:
- The syntax highlighting file needs to be modified to start a folding region at 
the caption, and end the region at the following caption (solvable).
- katepart needs to be told to fold specific regions. I don't think that's 
currently possible (KateCodeFoldingTree is a private class; you'd have to look 
for something suitable in the KTextEditor interface: http://api.kde.org/4.x-
api/kdelibs-apidocs/interfaces/ktexteditor/html/index.html).
 
Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20111107/2cb01143/attachment.sig>


More information about the Rkward-devel mailing list