i have saw some usages in such a form:
let i=1 | g/foo/s//\="blah_".i/ | let i=i+1
then my question is, what if i wanna substitute something with a list, such as ['one','two','three']
i have try the next script:
let i=0
let alist=['one','two','three']
for n in alist
g/foo/s//\=n/
endfor
let i=i+1
but all the 'foo' there would be replaced with 'one', not the 'two' or 'three'.
anyone have any ideas?
thanks.
--
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
Wednesday, July 20, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment