On Thursday 02 February 2006 14:32, Matt Rogers wrote: > On Thursday 02 February 2006 06:28, Anders Lund wrote: > > On Thursday 02 February 2006 02:40, Matt Rogers wrote: [...] > > > 2. Is this even possible? Does KTextEditor know enough about the > > > document and the text contained within to make an indenter interface > > > plus one or two default interface implementations worthwhile? > > > > The current indenters use information from the syntax highlighter, > > which isn't available in KTE. I don't know if that is absolutely > > nessecary, possibly we can add interface methods to know some basic > > things like if a specific position in the document is part of a > > comment. Alternatively, the interface could in in Katepart instead of > > KTE. > > IMHO, indenting should be independent of highlighting, so I think we > should just add interface methods to know the basic things. I agree with you: Indentation should be highlighting independant. With highlighting it is _much_ easier though, but it is probably impracticable to export all the highlighting api. > I'll try to get started on this, and will base my work on the current > auto-indenters in Kate. As I get something useful, i'll post code. :) Very cool. The autoindentation stuff is in kateautoindent.h. Some docs are available on [1]. Parts that have to be taken care of - provide indenter specific config page - provide functions to get global indentation settings (tabs or spaces or mixed, indent width) Do you have any plans to script indentation with lua/jscript? C++ is nice, but you can't provide updates during releases. Greetings, Dominik [1] http://www.kate-editor.org/index.php/Writing_Indenters _______________________________________________ Ktexteditor-devel mailing list Ktexteditor-devel@kde.org https://mail.kde.org/mailman/listinfo/ktexteditor-devel