> -----Original Message-----
> From: Dmitriy Yamkovoy [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 22, 2006 4:06 PM
> To: Vim List
> Subject: Single-File Vim?
>
> Hi all,
> Is there a binary compiled for Windows which allows me to run
> Vim without any of the runtime files? Long story short, I
> want something I can keep online or on a USB key and just
> copy to the desktop of any computer I sit at.
We had a large discussion on this topic probably six months back.
A number of us do this (on the Windows platforms).
We each had various options on how we do it.
I personally:
1. Copied my Vim directory to my USB key.
2. Run a batch file whenever I want to use Vim directly from the USB key.
The batch file is simple. It puts the k:\Vim\vim70 in the $PATH (assuming
k: is the USB key).
No setting of $VIM or $VIMRUNTIME is required.
Here is my batch file if anyone is interested.
************************
@echo off
@rem You can have Windows automatically run a batch file when you open
@rem a new command prompt by:
@rem HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
@rem and set it to run a BAT script of your choice when it
@rem starts up.
@rem
@rem I don't like this option and prefer to setup a shortcut to run:
@rem %SYSTEMROOT%\system32\cmd.exe /F:ON /K c:\vim\tools\setupVim.bat
@rem The /F:ON enables file/directory completion using CTRL-F. This
@rem is useful if you do not have any rights on the machine to modify:
@rem HKEY_LOCAL_MACHINE\Software\Microsoft\Command
Processor\CompletionChar
@rem and set it to hex 9 (TAB)
@rem Determine which drive letter we are executing this from:
@rem % 0 = the cmdline used to launch the cmd file.
@rem for /f %%i in ('echo %0') do @echo curr_dir=%%~di
@rem From HELP FOR (when typed from a cmd.exe prompt)
@rem You can now use the following optional syntax:
@rem % ~I - expands %I removing any surrounding quotes (")
@rem % ~fI - expands %I to a fully qualified path name
@rem % ~dI - expands %I to a drive letter only
@rem
@rem This will set BLAH = the current directory of the batch file
@rem set BLAH=%~dp0
@for /f %%i in ("%0") do @SET cmd_driveletter=%%~di
@SET driveletter=%cmd_driveletter
@echo.
@echo Executing %0 from this drive: %cmd_driveletter%
@echo.
@IF %1. NEQ . SET driveletter=%1:
@IF NOT EXIST %driveletter%\ SET driveletter=%cmd_driveletter%
:SETPATH
@echo.
@echo. Check if Vim is already in the PATH
@echo.
@echo on
@for %%P in (%PATH%) do @IF EXIST %%P\gvim.exe GOTO ALLREADYINPATH
@echo off
@echo.
@echo.Not already in PATH, adding it
@echo.
@goto ADDTOPATH
@echo.
@echo. Check if Vim is already in the PATH
@echo.
@echo on
%driveletter%\Vim\Tools\which.exe gvim.exe
@echo off
@IF %errorlevel% EQU 0 GOTO ALLREADYINPATH
:ADDTOPATH
@echo.
@echo. Setup path to include $VIM and other standard utilities
@echo.
@echo on
SET
PATH=%driveletter%\vim\tools;%driveletter%\Vim\Vim70;%driveletter%\util;%dri
veletter%\util\unix_tools;%PATH%
@echo off
@goto END
:ALLREADYINPATH
@echo.
@echo. Vim is already in the PATH
@echo.
@goto END
:END
************************