up vote 1 down vote favorite
share [g+] share [fb]

My _vimrc looks like this


set nocompatible
source $VIMRUNTIME/vimrc_example.vim
colorscheme pablo
set backup=~/vimfiles/backup
set directory=~/vimfiles/tmp

set diffexpr=MyDiff()
function MyDiff()
  let opt = '-a --binary '
  if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
  if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
  let arg1 = v:fname_in
  if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
  let arg2 = v:fname_new
  if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
  let arg3 = v:fname_out
  if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
  let eq = ''
  if $VIMRUNTIME =~ ' '
    if &sh =~ '\ ' . arg3 . eq
endfunction

however I believe it is using settings that would look like this


set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

set diffexpr=MyDiff()
function MyDiff()
  let opt = '-a --binary '
  if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
  if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
  let arg1 = v:fname_in
  if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
  let arg2 = v:fname_new
  if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
  let arg3 = v:fname_out
  if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
  let eq = ''
  if $VIMRUNTIME =~ ' '
    if &sh =~ '\ ' . arg3 . eq
endfunctio

The problem with this is

A) I liked my colorscheme it was there thanks to your help

B) I don't want to use the mswin configurations it messes me up especially the ctrl-z and ctrl-v doing things I don't like. I prefer having ctrl-v go to visual mode like makes sense.

C) I would like to have a temp directory and backup set up for vim. (to be honest I'm not sure if I'm doing this part right.

link|improve this question
Is there a reason that you are referring to your .vimrc file as _vimrc? – innaM Aug 27 '09 at 9:10
2  
Because the file is named _vimrc on Windows because Windows doesn't like file names starting with a . – faceless1_14 Aug 28 '09 at 13:16
feedback

1 Answer

up vote 5 down vote accepted

In VIM, type :version, and that'll at least show you the order that the *vimrc files are being loaded.

As for c), the set directory bit determines where VIM puts its swap files. To specify where the acutal backups go, use :set backupdir

link|improve this answer
ah thank you this was a huge help I apparently my vimrc got moved and it was looking at the wrong file. – faceless1_14 Aug 26 '09 at 17:17
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.