Wednesday, October 14, 2015

Re: Assistance requested debugging my .vimrc

On 2015-10-15, VML VWS wrote:
> Hi,
>
> Could anyone help me debug this .vimrc? It's pared down to just what's causing
> the bug. I'm getting the following errors. I wonder what's wrong with it?
>
>
> >Error detected while processing BufWrite AUto commands for
> "*vim_external_edition_buffer.*":
>
> >E121: Undefined variable: true 
>
> >E15: Invalid expression: true
>
> The .vimrc follows:
>
> autocmd BufWritePre *vim_external_edition_buffer.* :let b:vim_external_edition_buffer=true

The error message is telling you what's wrong with it. It is trying
to set b:vim_external_edition_buffer to the value of the variable
true, but you have no variable named true.

If you want to set b:vim_external_edition_buffer to the string
"true", then use

let b:vim_external_edition_buffer="true"

If you want to set b:vim_external_edition_buffer to a value that
evaluates to true in a logical expression, you can just set it to
some numeric value other than 0, e.g.,

let b:vim_external_edition_buffer=1

See

:help variables

and search for "boolean".

Regards,
Gary

--
--
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: