On Mar 18, 6:21 am, Sylvain Viart <[email protected]> wrote:

> I've the following macro working fine on vim 7.0 Vi IMproved 7.0 (2006
> May 7, compiled Aug 29 2007 11:52:41)
>
> nmap §Z :s/\.$//e<cr>0"zy$Izone "<esc>A" {<cr><tab>type
> master;<cr><c-u><tab>file "/etc/bind/db/<c-r>z";<cr><c-u>};<esc>
>
> which perform a small s/// removing an eventual dot and next rewrite the
> current line in a multiline statement
> giving :
>
> piupo.nl.
>
> INTO =>
>
> zone "piupo.nl" {
>     type master;
>     file "/etc/bind/db/piupo.nl";};
>
> ~
>
> But not on VIM 7.1
>
> zone "pipo.nl" {
>     type master;    file "/etc/bind/db/pipo.nl";};
>
> Missing 3 <CR>, any idea or a bug ?
>

I have no idea what might be wrong or what might have changed, but I'd
CERTAINLY rewrite your mapping to something simpler.

This should do about the same thing, much more elegently:

nmap §Z :s#^\(.*\)\.$#zone "\1" {\r\ttype master;\r\tfile "/etc/bind/
db/\1";\r};<CR>
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to