On Tuesday, January 5, 2016 at 1:34:48 PM UTC-5, Christian Brabandt wrote:
> Hi JomarBueyes!
> 
> On Di, 05 Jan 2016, JomarBueyes wrote:
> 
> > Hi,
> > 
> > I'm having this problem: I define a function as
> > 
> > function SetTabs(w)
> >     set sw=a:w
> >     set tabstop=w
> >     ( some other settings )
> > endfunction
> 
> :set does not accept expressions and does not expect variables. It wants 
> option values. The usual way to do this is either use exe to substitute 
> the variables:
> 
> :exe "set sw=".a:w
> 
> or even better in this case use the :let statement and access the option 
> values as &option like this:
> :let &sw=a:w
> 
> See :h expr-option
> 
> 
> 
> Best,
> Christian
> -- 
> Polizisten sind wie Schnittlauch: innen hohl, Augen grün, und sie treten
> meistens in Bündeln auf.

Hi Christian, 

Thank you very much for your response. It solved my problem. 

Vielen Danke

Jomar

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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to