[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta
Subject:    Re: [Quanta] Abbreviations and indentation
From:       Andras Mantia <amantia () kde ! org>
Date:       2006-10-11 20:33:26
Message-ID: 200610112333.27205.amantia () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Wednesday 11 October 2006 23:28, Maciej Trebacz wrote:
> On 10/11/06, Andras Mantia <amantia@kde.org> wrote:
> > The indentation is done by the editor, not by Quanta. We don't
> > control where the cursor will be when an enter is pressed, but
> > based on some rules, the editor does (this editor is by default the
> > "katepart" editor, used in Kate as well).
> > (...)
> > I see no other solution right now as we don't have access to the
> > editor's indentation method from Quanta itself.
>
> Maybe Quanta could check the indentation level at cursor position
> where the expanding begins, and then append tabs (or spaces) to every
> new line that it's inserting ?

This would still not work. What if a line inside the abbreviation would 
require indentation/de-indentation? An abbreviation can be several 
lines long. And not talking about the fact that we don't even know  
(well we know, but only for Katepart, and other editors might be used):
- if tabs or spaces should be used
- if 2/4/6/8 spaces should be used
- if the user's chosen indentation will match our guess

The only *real* solution would be to feed the string to the editor and 
let it do the job.

Andras

-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org

[Attachment #5 (application/pgp-signature)]

_______________________________________________
Quanta mailing list
Quanta@mail.kde.org
https://mail.kde.org/mailman/listinfo/quanta


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic