Hi Ben,
Ben Fritz a écrit :
>> 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>
>>
> 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>
>
Thanks,
In fact, the macro itself is not a problem.
It's just pretty strange that the behavior of vim is changing.
this macro is pasted from a recorded macro.
After I replaced the ^[ and ^M by <CR> and <ESC> etc. in a script.vim
It's from vim old school... ;-)
It seems come from <C-U> which remove the new line.
zone "pipo.nl" {
type master;
| <---- cursor here
hitting <c-u> here, moves the cursor back to the end of the line above.
Seems not an expected behavior to me.
May be an option activated by debian update or a new vim behavior ?
here is the options set
:set
--- Options ---
autowrite helplang=en nomodeline
syntax=vim winheight=99
background=dark history=50 ruler tabstop=4
filetype=vim hlsearch shiftwidth=4 ttyfast
backspace=indent,eol,start
runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim71,/usr/share/vim/vimfiles/after,/var/lib/vim/a
ddons/after,~/.vim/after
suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
termencoding=utf-8
hum seems a behavior of i_backspacing*
> The effect of the <BS>, CTRL-W, and CTRL-U depend on the 'backspace'
> option
> (unless 'revins' is set).
:echo &bs
indent,eol,start
:echo &revins
0
Seems odd to me, <BS> can go through start of line, but not <C-U>
Any clue ?
It is new in 7.1 ?
Regards,
Sylvain.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---