1

Re: / and : are not registers like in vim

In vim, a common task I do is create a complicated regexp with / and when I'm happy with it I want to use it in a search and replace command. To do this I:
:%s/<Ctrl-r>/

This puts the content of the / register on the command line. The / register contains the last thing that was searched for with /. Hence I don't need to memorize the complicated regexp I just created to be able to use it in a substitution.

This does not work in viemu since / and : are not registers that reflect the actions of those commands.

Last edited by mopi (2008-03-05 13:10:41)

2

Re: / and : are not registers like in vim

Hi mopi, you are right. The '/' and ':' registers are note emulated in the current version of ViEmu. This is planned for a future release.

There are a couple of possible workarounds for the issue you describe: for the more concrete :s probelme, you can use :s with an empty search pattern, which just uses the last search string.

And for a more advanced one, you can use <Ctrl-Y> while editing the command line to yank its contents, so that you will be able to paste it later with p, P, or even retrieve it as part of another command with <Ctrl-R>".

3

Re: / and : are not registers like in vim

_ is also missing as a register. Or whatever it should be called. Black hole maybe.

It can be used like this:
"_d                               : what you've ALWAYS wanted
"_dw                              : eg delete word (use blackhole)

Taken from http://www.rayninfo.co.uk/vimtips.html

4

Re: / and : are not registers like in vim

Ah very cool register... I'll try to add that one too, it shouldn't be too difficult (no functionality at all!).