Hi, [email protected] wrote: > > I d like to do the following: > > - remember the current value of an option, i.e. 'enc' , into a variable by > one vim script > > - Doing some stuff, which changes the option > > - re-set the option with the remembered value by another vim script. > > What would be the syntax for this remembering and setting?
you can access options as "variables" by prefixing them with an ampersand, e.g., let old_enc = &enc " do some stuff let &enc = old_enc Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin) -- 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
