Bug 188430 - Find/Replace - List number of occurences
Summary: Find/Replace - List number of occurences
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: search (other bugs)
Version First Reported In: unspecified
Platform: unspecified Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 197629 219898 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-29 22:32 UTC by Olivier Soares
Modified: 2010-11-14 22:36 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 4.5
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Soares 2009-03-29 22:32:48 UTC
Version:            (using KDE 4.2.1)
Installed from:    Unlisted Binary Package

I like the new highlight feature when you search text.
Would be nice also to see somewhere the number of occurences of the word/text.

Same thing when you replace. Would be nice to see somewhere that n replacement(s) have been made (like jedit does).

Thanks,
olivier
Comment 1 Christoph Feck 2009-06-30 10:01:58 UTC
*** Bug 197629 has been marked as a duplicate of this bug. ***
Comment 2 Erlend Hamberg 2009-06-30 10:46:39 UTC
i agree that this should be possible.

by the way, there is actually a (very non-intuitive) way to count the occurrences of a given string:

1) open the kate command line (F7)
2) type the command ":%s/foo/foo/g"

That will display a message like "5 replacements done of 3 lines", meaning that "foo" occurs 5 times on 3 separate lines.

if you only want "foo" alone, you can use the command :%s/\bfoo\b/foo/g".

[explanation: '%' means all lines, 's' is substitute, '/' is used as a delimiter and "foo" is replaced by "foo". the last 'g' means global, i.e., that all occurrences on a line will be replaced. "\b" in the last pattern means word boundary".]
Comment 3 Michal Gaspar 2009-08-15 22:07:42 UTC
*** This bug has been confirmed by popular vote. ***
Comment 4 Dominik Haumann 2010-11-14 22:35:07 UTC
*** Bug 219898 has been marked as a duplicate of this bug. ***
Comment 5 Dominik Haumann 2010-11-14 22:36:02 UTC
Bernhard implemented this for KDE 4.5. If you "Find All" or "Replace", the number of occurrences is shown.