Loading ...
Sorry, an error occurred while loading the content.

110697Re: How to find the location of the vim executable?

Expand Messages
  • Grizzly(Francis Smit)
    Jan 4, 2010
    • 0 Attachment
      Tony Mechelynck wrote:
      > On 01/12/09 20:33, Sean wrote:
      >
      >> Hi,
      >>
      >> Is it possible to detect the vim executable on which I am running?
      >>
      >> The purpose is to drop wget.exe to the same directory as gvim.exe
      >> and vimrun.exe under Windows. With three executables, I can make
      >> a simplest "plug and play" CLOUD input method, VimIM, on Windows.
      >>
      >> As of now, I ask users to drop wget.exe to the plugin directory, and
      >> I can detect it by using something like =>
      >> s:path=expand("<sfile>:p:h")."/"
      >>
      >> Thanks
      >>
      >> Sean
      >>
      >>
      >>
      >>
      >
      > IIUC, Vim can find executables and shared libraries found:
      > - on Windows, in the $VIMRUNTIME directory (I think). On Windows, this
      > directory usually contains the vim executable(s); Vim-related utilities
      > are placed either in the same directory or in some of its
      > sub-directories (e.g. $VIMRUNTIME/xxd/xxd.exe).
      > - on any platform (including Windows), programs can also be found
      > anywhere in the $PATH (of this I am sure).
      >
      > On Windows, this may depend on how Vim was installed, but often it is
      > something like "C:\Program Files\vim\vim72" where "Program Files" may be
      > different in non-English-language versions of Windows, and "vim72" is
      > for the current release 7.2 (stable).
      >
      > On Unix-like platforms (including Cygwin), the vim executable(s) will
      > usually be in the $PATH; by default in /usr/local/bin if you compile
      > them yourself, but often in /usr/bin and/or /bin and/or /usr/X11R6/bin
      > etc. if installed as part of a software distribution. However any
      > executable anywhere in the $PATH will be found so the exact location of
      > the wget executable (often /usr/bin) doesn't much matter in this case.
      >
      > On any platform, trying to execute a program will return a nonzero
      > status code (ERRORLEVEL in Dos/Windows batch language) if the program
      > isn't found (typically 127 or maybe 255). This return code can be
      > examined as the variable v:shell_error, so you can try invoking :!wget
      > then look at he value of v:shell_error.
      >
      >
      > Best regards,
      > Tony.
      >
      on unix/linux type this on the command line:
      type vim

      or
      type gvim

      the type command should return the path of vim

      or
      type -p vim

      --
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 4 messages in this topic