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 Answers
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.
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
.
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/.
-
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
%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\{
.\\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...)