For a while now I've wanted to have Vim setup on Windows identical to how I have it under Linux, however I've never really got round to doing it since it has always proven to be more of a pain than it is worth. However since I'm starting to do more development on Windows now it has become more worthwhile.
So this is what ended up working for me, a lot of existing instructions don't seem to account for the fact that you may be using an existing configuration. This was derived from the following sources:
git clone http://github.com/VundleVim/Vundle .vim/bundle/vundle.git
I'm using ConEmu as the terminal as it support 256 colours which is required for the theme I use.
There were a few small tweaks I had to do to get my existing config working correctly.
(the full set of modifications that I made to my configs is in this commit).
I had a line that set the default shell, as on Linux I typically use the Fish shell which has been known to give me problems in the past. This may not actually be the case anymore, however the easy fix was to just surround it with an OS check:
if !has("win32") set shell=bash endif
A similar thing was required for the colour scheme setup (as per the instructions here):
if has("win32") set term=xterm set t_Co=256 let &t_AB="\e[48;5;%dm" let &t_AF="\e[38;5;%dm" colorscheme zenburn else set t_Co=256 colorscheme distinguished endif
My preferred colour scheme did not seem to work even with the additional settings in the
_vimrc, however I quite like the
zenburn theme so am happy to use this on Windows for now.
if has("win32") func ConEmuBackspace() if col('.') == 1 if line('.') != 1 return "\<ESC>kA\<Del>" else return "" endif else return "\<Left>\<Del>" endif endfunc inoremap <Char-0x07F> <c-r>=ConEmuBackspace()<CR> nnoremap <Char-0x07F> <c-r>=ConEmuBackspace()<CR> endif