[PyKDE] eric3, qscintilla and code folding
Brad Ralph
brad at ralph.id.au
Tue Oct 18 14:36:33 BST 2005
Hi Baz,
Thanks for your suggestion it was very helpful. I tried Ctrl-clicking the
class fold marker and as you suggest it colapses all of the child folds. I
also tried the Ctrl and Shift but this is the same as the toggle all folds
menu option (class gets folded but the children don't).
The problem is I seem to be too fussy. When you fold all of the children
(Ctrl - Click) it becomes a bit annoying to have to unfold the if statements
and triple quoted strings of any method that you are working in. I know that
this can be turned off in the settings (so that strings are not folded) but
then we loose the option to do so if you want to on a case by case basis.
The whole idea of my little function is to only fold lines with 'def'
statements. This would be like having my cake and getting to eat it.
The other reason I was playing with code is to become more familiar with the
eric3 way of writing PyQt programs. eric3 is probably the biggest and most
functional PyQt program that I have seen to date so I figure there is a lot
that I can learn from it.
Regards,
Brad
ps. I would still like someone to chip in an answer to why my code doesn't
work reliably please.
On Tuesday 18 October 2005 04:20, you wrote:
> On Monday 17 Oct 2005 12:34, Brad Ralph wrote:
> > I am hoping someone can jump in here and help (Detlev?). Please ???
> >
> > I thought I would have a go at implementing the kind on functionality
> > that I was after but don't seem to be able to get it to work correctly.
>
> [snip]
>
> >>> When I create classes, I often want to fold all of the methods of the
> >>> class
>
> [snip]
>
> I think you can get what you want without writing any code at all. Try
> experimenting with some click/key combinations:
>
> Clicking in the fold margin with the Ctrl and Shift keys pressed, will
> toggle all top-level folds.
>
> Clicking on a fold button with the Ctrl key pressed it will toggle all
> child folds.
>
> HTH
More information about the PyQt
mailing list