A Loumiotis wrote:
> function! Conva_d(linenr)
>   let line = getline(a:linenr)
>   let result = []
>   for i in ["a","b","c","d"]
>     call add(result, substitute(line, 'x\(\w\)\@!','_' . i, 'g'))
>   endfor
>   call setline(a:linenr, result[0])
>   execute a:linenr . 'put =result[1:]'
> endfunction

>From something Ben mentioned, the line:
  execute a:linenr . 'put =result[1:]'

is more cleanly written as:
  call append(a:linenr, result[1:])

John

-- 
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

Reply via email to