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

53830Re: vimrc on windows

Expand Messages
  • Antoine J. Mechelynck
    Sep 29, 2004
      Mathias Michaelis <michaelis@...> wrote:
      > Hi Tom
      > > I'm trying to get vim running on a Windows box.
      > >
      > I had my problems too, and I regret that I didn't wrote my log book
      > of the installation process. I try to answere thought, because I
      > even had to modify some of the BAT files that comes with vim. But I
      > think it is better to go on step by step.
      > I assume you have installed vim with the installation program
      > gvim6?.exe (and not manually).
      > Then, after installation, I set (as administrator and as normal
      > user, in WindowsNT/2000/XP with a right click on the "My Computer"
      > symbol, tab "extended", button "environment vars" and in Windows
      > 95/98/Me by editing the C:\AUTOEXEC.BAT file) the variables
      > VIM=C:\Documents and Settings\<<username>>\Application Data\vim
      > VIMRUNTIME=C:\Program Files\Vim\vim6?
      > The space within the path names where no problem for me on Windows
      > XP, but they could by a problem on other Windows platforms.
      > Now I created the directory
      > C:\Documents and Settings\<<username>>\Application Data\vim,
      > for every user <<username>> that works with vim.
      > Then every user that works with vim has to copy the files
      > C:\Program Files\Vim\_vimrc to $VIM\_vimrc
      > C:\Program Files\Vim\vim63\vimrc_example.vim to $VIM\myvim.vim
      > C:\Program Files\Vim\vim63\mswin.vim to $VIM\mswin.vim
      > (where $VIM is defined for every user as mentioned above).
      > Then I copied the whole, empty directory tree
      > C:\Program Files\Vim\vimfiles to $VIM\vimfiles
      > Then I began to customise the configuration files. In $VIM\_vimrc I
      > changed the lines
      > "source $VIMRUNTIME/vimrc_example.vim" to "source $VIM/myvim.vim"
      > "source $VIMRUNTIME/mswin.vim" to "source $VIM/mswin.vim"
      > Also the myvim.vim file has to be changed. There, after the line
      > that contains "set nocompatible", I inserted the following text:
      > " save global variables that consists of upper case letters
      > "
      > set viminfo+=!
      > " define the name of the viminfo file
      > "
      > set viminfo+=n~\\Application\ Data\\vim\\_viminfo
      > " set a nice font
      > "
      > set guifont=courier_new:h10
      > Of cource, I changed some other things too, but this where my
      > personal preferences. For example, I created a directory named
      > $VIM\BAK and then inserted the line
      > set backupdir=$VIM/BACK/ " Backup Directory
      > into the myvim.vim file. Also, at the very end of myvim.vim, I
      > inserted a patch that was discussed in the thread "gvim initial
      > window placement" on September 11, 2004 in this mailing list.
      > When I tryed vim.exe or gvim.exe now, I found that all my settings
      > where ignored :-( This was the of course a good reason for me to
      > gave up. But after a view month I found out that I have to alter all
      > the BAT files that the installer gvim6?.exe placed into the
      > C:\WINDOWS directory. This BAT files are listed by the command
      > dir %windir%\*vi*.bat
      > In all this files I replaced all occurrences of %VIM% by
      > %VIM_INSTALL_DIRECTORY%. Then I replaced, somewhere at the beginning
      > of all this files, the line
      > set VIM=C:\Program Files\Vim
      > by the lines
      > > > First, find out where gvim.exe is stored
      > SET VIM_INSTALL_DIRECTORY=C:\Program Files\Vim\vim63
      > IF EXIST "%VIMRUNTIME%\gvim.exe" \
      > Here, you have to connect lines that ends with `\´. Firthermore,
      > instead of <<IF EXIST "%VIMRUNTIME%\gvim.exe">> I used also
      > <<IF EXIST "%VIMRUNTIME%\vim.exe">>, if the name of the edited BAT
      > file did not begin with a `g´. But I think this doesn't matter.
      > > From now on all things worked fine for me :-)
      > Sincerly,
      > Mathias
      > --
      > [X] nail here for new monitor

      The VIM environment var should be the same for everyone (in your example,
      C:\Program Files\vim or C:\PROGRA~1\vim). It holds system-wide additions to
      the distribution (and, in vim63 aka VIMRUNTIME, the distro itself). Vim is
      clever enough to deduce $VIMRUNTIME from $VIM if the latter is set properly.
      For user-private data, use HOME. Also, talking of environment vars, I
      recommend adding to your PATH the directory holding vim.exe and/or gvim.exe
      (the one which vim will name $VIMRUNTIME though you don't have to do it

      :help starting.txt
      :help 'vimruntime'
      :help :runtime
      and others

    • Show all 24 messages in this topic