Wednesday, October 24, 2012

Re: How to check for $ProgramFiles(x86) ?

On Wednesday, October 24, 2012 3:25:41 PM UTC-5, Timothy Madden wrote:
>
> I am trying to see if the current system is 32-bit or 64-bit Windows. On
> 64-bit Windows the environment variable $ProgramFiles(x86) is known to
> exits, but Vim will just check for $ProgramFiles and the appendthe
> '(x86)' part. Is there a way to check if the environment variable
> $ProgramFiles(x86) exists in the current environment ?
>
> I tried both expand('$ProgramFiles(x86)') and
> exists('$ProgramFiles(x86)'), both of them check the '$ProgamFiles' part
> only.
>

:help expand-environment-var says that only letters, digits, and _ are allowed in the environment variable name. I am not sure whether there is a workaround.

Perhaps Vim needs to allow a different set of characters for Windows environment variables, or some way to escape the characters to indicate they are part of the name.

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

No comments: