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

List:       kwrite-devel
Subject:    Re: Seaching for a string
From:       bbeschow () cs ! tu-berlin ! de
Date:       2009-10-28 17:49:32
Message-ID: 316fe148fe65e2c7d171aa1c814e4d87.squirrel () mail ! cs ! tu-berlin ! de
[Download RAW message or body]

> Hi,
Hey Erlend,

> I would very much like to implement the Vi commands * and # for the Vi
> Mode.
> These start a search for the word under the cursor in the forward/backward
> direction.
>
> In Kate, as far as I can see, this logic is all tied to the graphical
> search
> widget (search/katesearchbar.h), but is there a way to simply search for a
> pattern without opening the search bar? I still want the
> findNext()/findPrevious() methods in the search bar to work as I use these
> for
> the find next/previous commands.
Well, you can use KTE::SearchInterface::searchText(), which is implemented
by KateDocument. However, you'd have to supply the ranges for searching
manually. Is this sufficient for your needs?

BTW, I've started to refactor the search stuff. I'm planning to separate
the business logic from the presentation, which means that searching from
the current cursor position will be available without the search bar.
Unfortunately, due to my university work, my time is currently very
limited. But be prepared that after the sprint this will be finished ;-)

Greetings,
Bernhard


_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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