On Tue, Oct 03, 2006 at 10:00:51PM -0700, Hari Krishna Dara wrote:
Yegappan already answered your question. However, in case you want to do
the whole of it in the same function, I recommend the below pattern:
let _ic = ignorecase
set noic
try
do something
finally
let ignorecase
Hi,
when writing a function in vim script sometimes it makes sense to
change options of vim.
Are these changes local to the function ?
And if not: Can I simply assign the current value of the option to a
variable, change the option and restore the option value from the
value stored in
Hi,
On 10/3/06, Meino Christian Cramer [EMAIL PROTECTED] wrote:
Hi,
when writing a function in vim script sometimes it makes sense to
change options of vim.
Are these changes local to the function ?
And if not: Can I simply assign the current value of the option to a
variable, change the
Hello,
Hi,
when writing a function in vim script sometimes it makes sense to
change options of vim.
Are these changes local to the function ?
No, they persist after the function is ended. As a simple example, you could
use a function like the following to toggle the 'number' option.
On Wed, 4 Oct 2006 at 5:09am, Meino Christian Cramer wrote:
Hi,
when writing a function in vim script sometimes it makes sense to
change options of vim.
Are these changes local to the function ?
And if not: Can I simply assign the current value of the option to a
variable, change