Am Donnerstag, 11. August 2011 07:24:39 UTC+2 schrieb Chen San: > > if i just input the command let i=0 | > g/src=""/s//\='src="'.g:imglist[i].'"'/g | let i=i+1 into the ex command > line, it just worked as i expected. >
I assume that this line is interpreted by vim as let i=0 g/src=""/s//\='src="'.g:imglist[i].'"'/g | let i=i+1 i.e. the let command is executed on every item. The way you broke that line down, variable i will be incremented only after running :g over the buffer. HTH Tom -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
