Friday, November 25, 2011

Re: Backporting script to vim 6.3 (need help)

On Nov 25, 9:47 am, Marc Weber <marco-owe...@gmx.de> wrote:
> Excerpts from Preben Randhol's message of Fri Nov 25 09:37:40 +0100 2011:> Yes, thank you! That did the trick and now I understand why this line
> > is not working in 6.3
> >    let l:indent_type = {'space': 0, 'tab': 0}
>
> try :echo {'space': 0, 'tab': 0}
>
> to make sure that dictionaries are supported. If this fails you have to
> use the old syntax:
>
> let g:foo{key} = xx
> or such.
>
> l: is no needed. vars are function local by default so you can try
> removing it as well. Again - I can't test.
>
> Marc Weber

Thanks. I'll try. A bigger problem at the moment is that I cannot
figure out how to return multiple variables from a function:

I'm testing with this code, but get error on the return part.

function! Myfoo()
let a = 1
let b = 2
return [a, b]
endfunction

function Mybar()
let c = 3
let d = 4
echomsg "c=".c
echomsg "d=".d
let [c,d] = Myfoo()

echomsg "c=".c
echomsg "d=".d
endfunction

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

No comments:

Post a Comment