uriparser 0.6.0 released
libSpiff 0.8.0 released
libSpiff 0.7.3 released
uriparser 0.5.2 released
Kate searching: On-the-fly case conversion
I just added a feature to search and replace in Kate/KWrite that is so cool I just have to blog about it. :-) The idea is not new, at least EmEditor can do this for quite some time: on-the-fly case conversion when replacing text.
Let me demonstrate what this feature can do. Say our document reads "Music", when we now regex-replace with
Search: ".*" Replace: "\U\0_\L\0_\E\0"
we get MUSIC_music_Music
as a result. What did we do?
We set the case conversion mode to uppercase (\U
),
lowercase (\L
) and then back to don't-modify (\E
).
With this new tool at hand we can now solve the camel case issue we had
last time
when generating setters from class members:
Search: "^(.+) (m_(.)(.+));" Replace: "void Some::set\U\3\E\4(\1 \3\4) {\n \2 = \3\4;\n}\n"
Input:
char * m_name; int m_count;
Output:
void Some::setName(char * name) { m_name = name; } void Some::setCount(int count) { m_count = count; }
Isn't that nice! :-) The only thing I'm still missing is something like a
counter so we can enumerate lines/matches when replacing. It should be quite
easy to implement but I'm not sure about the "design" yet: should it offer
zero padding width and a start value? What should the escape sequences look
like then? Maybe \#w3s2#
for 002
, 003
, ...? Is \#
bound to a meaning
somewhere else already?
I'll go get some sleep first :-)
Kate searching: Please help with beta testing!
Hello again! The search and replace functionality of Kate/KWrite now is in a usable state. I just fixed another two bugs and we are now at the point where bugs are found by real life application.
So what I'm asking for is if you have checked out Kate/KWrite anyway please check if it can handle your daily search and replace tasks.
As an appetizer creating setters from class members should be no problem:
Search: "^(.+) (m_(.+));" Replace: "void Some::set\3(\1 \3) {\n \2 = \3;\n}\n"
Input:
char * m_name; int m_count;
Output:
void Some::setname(char * name) { m_name = name; } void Some::setcount(int count) { m_count = count; }
Yes, the camel case is broken but there is a solution to that (\U
, \L
and \E
as in EmEditor) that I hope to find time for later.
Now throw bug reports at me! :-)
Kate can do Searching!
Two weeks have passed since I last showed pictures of a possible future of the searching experience with KatePart, and thus Kate, KWrite and friends. Since then progress has been made: Florian Grässle of OpenUsability strongly improved my original dialog drafts and I started implementing the improved dialog mockups. What you can see below are actual screenshots of Kate from the Subversion trunk.
There is still more code to write and bugs to fix but the basic functionality is there. That plus previously missing features like support for
- multi-line search patterns
- escape sequence resolution in the replacement text.
That's it for now, please don't beat me if I should miss a bug :-)
uriparser 0.5.1 released
This release fixes several bugs revealed by test cases from 4Suite (http://4suite.org/). Please update your copy of uriparser.
libSpiff 0.7.2 released
Kate searching preview 2
Here is my current idea for the power search and replace dialog (click to enlarge):
The shortcut keys (underlined letters) must not conflict with those used by Kate's menu, which became a little tricky. I am wondering how we will solve this problem for other programs using KatePart - what if they use some of these shortcuts for the menu? Here is the updated Firefoxy one:
Comments welcome.
[EDIT]: Dialogs were just "drawn" with Qt Designer — they are not integrated yet.