On Tue, Sep 29, 2009 at 12:23 AM, Tinou <[email protected]> wrote:

>
> On Mon, Sep 28, 2009 at 18:02, Steven Woody <[email protected]> wrote:
> > Hi,
>
> Hello,
>
> > I want to do this in my script:
> > function IdentLvl(n)
> >     set tabstop=a:n
> >     set shiftwidth=a:n
> >     set softtabstop=a:n
> > endfunc
> > then, call IdentLvl(4).
> > But it simply raises an error, "a number required".   What's wrong with
> it?
> > Thanks.
>
> Two solutions:
>
> 1.
> let &tabstop=a:n
> let &shiftwidth=a:n
> let &softtabstop=a:n
>
> 2.
> exe 'set tabstop='.a:n
> exe 'set shiftwidth='.a:n
> exe 'set softtabstop='.a:n
>
> Kind regards,
>

It works! Thanks.


-- 
Life is the only flaw in an otherwise perfect nonexistence
   -- Schopenhauer

narke
public key at http://subkeys.pgp.net:11371 ([email protected])

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

Reply via email to