Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
From: Elias Pschernig <elias@us...> - 2004-03-09 10:07:56
On Tue, 2004-03-09 at 05:55, Steve Hall wrote:
> This is one of my least favorite aspects of Cream, too. The central
> reason behind them is so that users can enter standard text strings
> without having to worry about regular expressions (regexp). We permit
> only two represented characters, "\n" and "\t". The rest are always
> taken literally.
> Why disable such a powerful feature? (If you have a lot of experience
> with regexps, you will acknowledge their usefulness.) Because they are
> unintuitive and impossible to use without quite a bit of learning.
> That's not Cream. While we aim for the project to have simple access
> to these tools (a checkbox), we don't want them on by default.
> Unfortunately, Vim's Find and Find/Replace dialogs don't return the
> strings for us to act on them. That means backslashes can be deadly,
> especially in a Windows environment. (Read ":help /magic" for more.)
Hm, my gvim doesn't seem to allow regexps. Or, at least, it has me put a
\ before any characters like [ ] . * to enable their special meaning.
Still, in 99% of time, I just want to do what the gvim search allows me.
If maybe the cream dialog could be modified to: Allow hitting Enter
instead of Alt-O to acknowledge the search, like gvim (yes, gvim has a
better shortcut in this one case right now!) - and also, like gvim,
multiple hitting Enter should jump to the next occurences. And then,
something is wrong with the cream dialog, since it makes this ugly
alert-box sound all the time. Maybe the Dialog-Type can be changed or
something, since I think that's actually the most annoying for me. Might
try finding and changing the sound somewhere in the Gnome settings I
guess :) .. but for real alert boxes, it is ok. So with these changes,
it would already be better..
> So Cream's implementation of Find and Replace are hackish at best.
> Even I frequently find myself doing <Ctrl+L>:%s/...
> What can we do about this?
> 1. Write patches or lobby others to write patches to make the existing
> Vim Find and Replace dialogs more flexible. A relatively simple
> change could return the input strings back for processing prior to
> making the actual find or replace.
> 2. Sponser Vim and vote for the features you'd like to see implemented
> that help Cream:
> 3. Remap the Cream defaults by adding your own mappings in cream-user:
> imap <silent> <C-f> <C-o>:promptfind<CR>
> imap <silent> <C-h> <C-o>:promptrepl<CR>
> Just remember that the characters that you put in those input boxes
> are regular expressions, not strings. (For example, "\n" means
> something different in Find than it does Replace.)
> Sorry that's not a great answer. It frustrates me too, I'd be happy to
> listen to alternative solutions.
It is a great answer for me, I'll just use your solution 3 above for
now. So thanks, just what I hoped to get when posting here :)
Elias Pschernig <elias@...>