Monday, April 4, 2011

Re: CLI VIM on Windows

On 03/04/11 14:35, Dotan Cohen wrote:
> I use a terrible Windows 7 machine at my college with no admin access.
> I do have access to the CMD and can run "portable apps" on it. I can
> alter the path in the CMD. The first thing that I do when I sit at a
> machine is mount my DiskOnKey then add the path to Gvim (on the
> DiskOnKey) to the CMD. However, it opens a new window with Gvim, and I
> must use the rather long "gVimPortable.exe" command. Is there a way to
> get the behaviour of vim on Linux, where I would just type vim and it
> would open in the CMD?
>
> Thanks.
>

As Taylor said, on Windows, unlike on Unix/Linux, you need a different
Vim executable for console mode and GUI mode. "Vim without Cream"
http://sourceforge.net/projects/cream/files/Vim/ includes both, together
with their runtime files, but you may have to specify a nonstandard
install location when installing it and maybe also a VIM environment
variable when running it. For instance (assuming Q: is the external
drive) install to Q:\vim so that the Vim executables and runtime files
are put into Q:\vim\vim73 (which, at runtime, will be your $VIMRUNTIME
directory, but don't set VIMRUNTIME outside of Vim) and use SET
VIM=Q:\VIM in your cmd.exe startup. Any "custom" plugins (which you may
write yourself, or download from other sources than the Vim
distribution) will go in subfolders of what vim sees as $VIM/vimfiles
and cmd.exe sees as %VIM%\vimfiles (see ":help 'runtimepath'"), you may
also put your _vimrc in $VIM rather than $HOME if it makes life easier
for you -- and you may start Console Vim as %VIM%\vim73\vim or gvim as
%VIM%\vim73\gvim. Or add %VIM%\vim73 to your PATH (in addition to what
is already there) and then typing just vim (for Console Vim) or just
gvim (for GUI vim) will do the trick.

If someday a Vim 7.4 comes along, your custom plugins (if any) will
remain in Q:\vim\vimfiles but the new distribution will be placed into
Q:\vim\vim74 instead of Q:\vim\vim73 -- which is one of the reasons why
you should NEVER make changes anywhere in or below $VIMRUNTIME: any
upgrade may remove such changes without warning, and sooner or later one
will.


Best regards,
Tony.
--
Basic is a high level languish.
APL is a high level anguish.

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