linux - Translating a vimrc to Windows -
i installed vim windows, , trying port vimrc linux.
the bash script in vimrc need make work follows :
set nocompatible source $vim behave mswin let icanhazvundle=1 let vundle_readme=expand('$vim/bundle/vundle/readme.md') if !filereadable(vundle_readme) echo "installing vundle..." echo "" silent !mkdir $vim/bundle silent !git clone https://github.com/gmarik/vundle $vim/bundle/vundle let icanhazvundle=0 endif " required vundle filetype off set rtp+=$vim/bundle/vundle/ call vundle#rc() " let vundle manage vundle " required! bundle 'rip-rip/clang_complete notice checks see if vundle packages have been installed or not(based on existence of readme), , installs them if not. included first bundle call give idea of how executes. difference in code below , original linux script replaced entries linux file system: ~/.vim $vim . when run :echo $vim in windows vim terminal gives me proper path. script runs, fails call vundle#rc() , subsequently fails outright bundle calls. note have msysgit installed.
edit mkdir function working , environment variable typed wrong console. also, msysgit needed upgraded (failing unknown reasons. faced problem :
error detected while processing c:\program files (x86)\vim\_vimrc: line 58: e117: unknown function: vundle#rc line 62: e492: not editor command: bundle 'rip-rip/clang_complete' any suggestions appreciated!
it seems main problem have line,
silent !mkdir $vim/bundle using ! shell escape, tires call external command mkdir. however, command doesn’t exist on windows (unless you’ve installed cygwin or similar , gnu tools in path) , use of silent means error message not printed screen.
to create directory in operating system, can use vim’s own built-in mkdir() function. following command using string concatenation (using . operator) build directory path should work:
call mkdir($vim . "/bundle") if directory created correctly, following external git command should work long have git installed , available in windows path.
Comments
Post a Comment