2

The "Find in Project" function is quite useful, however it is case-sensitive, at least when using %s in the text box right of the dropdown box with Template: Normal. Is there documentation on what the %s stands for and what alternatives are allowed?

3
  • I do not use Kile but I know little bit about Unix. Check if Kile supports regular expressions. I do not know what "Find in Project" mean but if you are using Unix like system or if you feel brave enough to install Cygwin on your Windows machine I would suggest that you learn about grep and sed. Commented Jan 3, 2012 at 23:31
  • The %s stands for string and simply pastes the string of the field above into the search phrase. I found this out by selecting Template: Command where the %s becomes a \\%s\{.
    – Unapiedra
    Commented Jan 4, 2012 at 21:13
  • I can cause a "Grep Tool Error" by putting \\section{%s in the second field. The error message is "Invalid regular expression: bad repetition syntax". From this we now know that grep is used as the underlying tool. (It might be easier looking in the source code...)
    – Unapiedra
    Commented Jan 4, 2012 at 21:21

3 Answers 3

2

In line with my comments, I tried a bit around.

Kile uses grep as its search tool.

Passing -i as an option won't work. However, you can use regular expression up to a degree. Example:

Using Template normal and search for mechanik, where it is either spelled mechanik or Mechanik, then use [mM]echanik or (Mechanik|mechanik) or (M|m)echanik.

I know this is not a complete answer, I will expand, if I know more.

2

From https://projects.kde.org/projects/extragear/office/kile/repository/revisions/master/entry/src/dialogs/findfilesdialog.cpp, QString FindFilesDialog::buildProjectCommand() etc., it seems that it is not possible. It would be nice to have and be only a small addition to kile, but it's just not there. The hard-coded options passed to grep are -n -E -I -H -e.

1

Like Predag says I would suggest using sed. See an introduction here: http://www.grymoire.com/Unix/Sed.html and one for regular expressions here: http://www.regular-expressions.info/.

1
  • I know how to use sed, thanks :) But it'd be more convenient to have a "kile solution" because it allows to open the files by clicking on the search results without using external apps. Commented Jan 4, 2012 at 14:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .