Gabor Urban wrote:
> Hy guys,
>
> I am to write a simple function to insert some headers in the buffer.
> Here is the code:
>
> ---- cut
> function Header(...)
>       let template = ["Id", "Short Description", "Severity", "Status", 
> "Description"]
>       let i = 1
>               echo "Test" i   
> "     for item in template
> "             append(i, item)
> "             let i = i + 1
> "             endfor
> endfunction
>
> ---- cut
>
> This script compiles and runs properly. If I remove the comments from
> the 'for' loop, I have an
> error message during compilation:
> E126: missing :endfunction
>
> The linenumber is 11 for the error, the whole file is 10 lines long,
> with a blank at the end.
>
> I use vim 7.2 on an XP box with GUI support in the office.
>
> Any ideas?
>   

Use
  call append(i,item)

rather th an
  append(i,item)

Regards,
Chip Campbell


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to