title: configure gvim setting color and font
body: <p>I want to try out vim, but have a little trouble with the config file. I have installed gvim here <code>C:\Program Files (x86)\Vim\vim73</code> and added a file called <code>C:\Program Files (x86)\Vim\vim73\.vimrc</code>, but when I try different configurations it does not seem to change anything. </p>
  
  <p>I tried this one for example</p>
  
  <pre><code>"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " Maintainer: amix the lucky stiff
  "             http://amix.dk - amix@amix.dk
  "
  " Version: 3.6 - 25/08/10 14:40:30
  "
  " Blog_post: 
  "       http://amix.dk/blog/post/19486#The-ultimate-vim-configuration-vimrc
  " Syntax_highlighted:
  "       http://amix.dk/vim/vimrc.html
  " Raw_version: 
  "       http://amix.dk/vim/vimrc.txt
  "
  " How_to_Install_on_Unix:
  "    $ mkdir ~/.vim_runtime
  "    $ svn co svn://orangoo.com/vim ~/.vim_runtime
  "    $ cat ~/.vim_runtime/install.sh
  "    $ sh ~/.vim_runtime/install.sh &lt;system&gt;
  "      &lt;sytem&gt; can be `mac`, `linux` or `windows`
  "
  " How_to_Upgrade:
  "    $ svn update ~/.vim_runtime
  "
  " Sections:
  "    -&gt; General
  "    -&gt; VIM user interface
  "    -&gt; Colors and Fonts
  "    -&gt; Files and backups
  "    -&gt; Text, tab and indent related
  "    -&gt; Visual mode related
  "    -&gt; Command mode related
  "    -&gt; Moving around, tabs and buffers
  "    -&gt; Statusline
  "    -&gt; Parenthesis/bracket expanding
  "    -&gt; General Abbrevs
  "    -&gt; Editing mappings
  "
  "    -&gt; Cope
  "    -&gt; Minibuffer plugin
  "    -&gt; Omni complete functions
  "    -&gt; Python section
  "    -&gt; JavaScript section
  "
  "
  " Plugins_Included:
  "     &gt; minibufexpl.vim - http://www.vim.org/scripts/script.php?script_id=159
  "       Makes it easy to get an overview of buffers:
  "           info -&gt; :e ~/.vim_runtime/plugin/minibufexpl.vim
  "
  "     &gt; bufexplorer - http://www.vim.org/scripts/script.php?script_id=42
  "       Makes it easy to switch between buffers:
  "           info -&gt; :help bufExplorer
  "
  "     &gt; yankring.vim - http://www.vim.org/scripts/script.php?script_id=1234
  "       Emacs's killring, useful when using the clipboard:
  "           info -&gt; :help yankring
  "
  "     &gt; surround.vim - http://www.vim.org/scripts/script.php?script_id=1697
  "       Makes it easy to work with surrounding text:
  "           info -&gt; :help surround
  "
  "     &gt; snipMate.vim - http://www.vim.org/scripts/script.php?script_id=2540
  "       Snippets for many languages (similar to TextMate's):
  "           info -&gt; :help snipMate
  "
  "     &gt; mru.vim - http://www.vim.org/scripts/script.php?script_id=521
  "       Plugin to manage Most Recently Used (MRU) files:
  "           info -&gt; :e ~/.vim_runtime/plugin/mru.vim
  "
  "     &gt; Command-T - http://www.vim.org/scripts/script.php?script_id=3025
  "       Command-T plug-in provides an extremely fast, intuitive mechanism for opening filesa:
  "           info -&gt; :help CommandT
  "           screencast and web-help -&gt; http://amix.dk/blog/post/19501
  "
  "
  "  Revisions:
  "     &gt; 3.6: Added lots of stuff (colors, Command-T, Vim 7.3 persistent undo etc.)
  "     &gt; 3.5: Paste mode is now shown in status line  if you are in paste mode
  "     &gt; 3.4: Added mru.vim
  "     &gt; 3.3: Added syntax highlighting for Mako mako.vim 
  "     &gt; 3.2: Turned on python_highlight_all for better syntax
  "            highlighting for Python
  "     &gt; 3.1: Added revisions ;) and bufexplorer.vim
  "
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  
  
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " =&gt; General
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " Sets how many lines of history VIM has to remember
  set history=700
  
  " Enable filetype plugin
  filetype plugin on
  filetype indent on
  
  " Set to auto read when a file is changed from the outside
  set autoread
  
  " With a map leader it's possible to do extra key combinations
  " like &lt;leader&gt;w saves the current file
  let mapleader = ","
  let g:mapleader = ","
  
  " Fast saving
  nmap &lt;leader&gt;w :w!&lt;cr&gt;
  
  " Fast editing of the .vimrc
  map &lt;leader&gt;e :e! ~/.vim_runtime/vimrc&lt;cr&gt;
  
  " When vimrc is edited, reload it
  autocmd! bufwritepost vimrc source ~/.vim_runtime/vimrc
  
  
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " =&gt; VIM user interface
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " Set 7 lines to the curors - when moving vertical..
  set so=7
  
  set wildmenu "Turn on WiLd menu
  
  set ruler "Always show current position
  
  set cmdheight=2 "The commandbar height
  
  set hid "Change buffer - without saving
  
  " Set backspace config
  set backspace=eol,start,indent
  set whichwrap+=&lt;,&gt;,h,l
  
  set ignorecase "Ignore case when searching
  set smartcase
  
  set hlsearch "Highlight search things
  
  set incsearch "Make search act like search in modern browsers
  set nolazyredraw "Don't redraw while executing macros 
  
  set magic "Set magic on, for regular expressions
  
  set showmatch "Show matching bracets when text indicator is over them
  set mat=2 "How many tenths of a second to blink
  
  " No sound on errors
  set noerrorbells
  set novisualbell
  set t_vb=
  set tm=500
  
  
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " =&gt; Colors and Fonts
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  syntax enable "Enable syntax hl
  
  " Set font according to system
  if MySys() == "mac"
    set gfn=Menlo:h14
    set shell=/bin/bash
  elseif MySys() == "windows"
    set gfn=Bitstream\ Vera\ Sans\ Mono:h10
  elseif MySys() == "linux"
    set gfn=Monospace\ 10
    set shell=/bin/bash
  endif
  
  if has("gui_running")
    set guioptions-=T
    set t_Co=256
    set background=dark
    colorscheme peaksea
    set nonu
  else
    colorscheme zellner
    set background=dark
  
    set nonu
  endif
  
  set encoding=utf8
  try
      lang en_US
  catch
  endtry
  
  set ffs=unix,dos,mac "Default file types
  
  
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " =&gt; Files, backups and undo
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " Turn backup off, since most stuff is in SVN, git anyway...
  set nobackup
  set nowb
  set noswapfile
  
  "Persistent undo
  try
      if MySys() == "windows"
        set undodir=C:\Windows\Temp
      else
        set undodir=~/.vim_runtime/undodir
      endif
  
      set undofile
  catch
  endtry
  
  
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " =&gt; Text, tab and indent related
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  set expandtab
  set shiftwidth=4
  set tabstop=4
  set smarttab
  
  set lbr
  set tw=500
  
  set ai "Auto indent
  set si "Smart indet
  set wrap "Wrap lines
  
  
  """"""""""""""""""""""""""""""
  " =&gt; Visual mode related
  """"""""""""""""""""""""""""""
  " Really useful!
  "  In visual mode when you press * or # to search for the current selection
  vnoremap &lt;silent&gt; * :call VisualSearch('f')&lt;CR&gt;
  vnoremap &lt;silent&gt; # :call VisualSearch('b')&lt;CR&gt;
  
  " When you press gv you vimgrep after the selected text
  vnoremap &lt;silent&gt; gv :call VisualSearch('gv')&lt;CR&gt;
  map &lt;leader&gt;g :vimgrep // **/*.&lt;left&gt;&lt;left&gt;&lt;left&gt;&lt;left&gt;&lt;left&gt;&lt;left&gt;&lt;left&gt;
  
  
  function! CmdLine(str)
      exe "menu Foo.Bar :" . a:str
      emenu Foo.Bar
      unmenu Foo
  endfunction 
  
  " From an idea by Michael Naumann
  function! VisualSearch(direction) range
      let l:saved_reg = @"
      execute "normal! vgvy"
  
      let l:pattern = escape(@", '\\/.*$^~[]')
      let l:pattern = substitute(l:pattern, "\n$", "", "")
  
      if a:direction == 'b'
          execute "normal ?" . l:pattern . "^M"
      elseif a:direction == 'gv'
          call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.')
      elseif a:direction == 'f'
          execute "normal /" . l:pattern . "^M"
      endif
  
      let @/ = l:pattern
      let @" = l:saved_reg
  endfunction
  
  
  
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " =&gt; Command mode related
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " Smart mappings on the command line
  cno $h e ~/
  cno $d e ~/Desktop/
  cno $j e ./
  cno $c e &lt;C-\&gt;eCurrentFileDir("e")&lt;cr&gt;
  
  " $q is super useful when browsing on the command line
  cno $q &lt;C-\&gt;eDeleteTillSlash()&lt;cr&gt;
  
  " Bash like keys for the command line
  cnoremap &lt;C-A&gt;      &lt;Home&gt;
  cnoremap &lt;C-E&gt;      &lt;End&gt;
  cnoremap &lt;C-K&gt;      &lt;C-U&gt;
  
  cnoremap &lt;C-P&gt; &lt;Up&gt;
  cnoremap &lt;C-N&gt; &lt;Down&gt;
  
  " Useful on some European keyboards
  map Â½ $
  imap Â½ $
  vmap Â½ $
  cmap Â½ $
  
  
  func! Cwd()
    let cwd = getcwd()
    return "e " . cwd 
  endfunc
  
  func! DeleteTillSlash()
    let g:cmd = getcmdline()
    if MySys() == "linux" || MySys() == "mac"
      let g:cmd_edited = substitute(g:cmd, "\\(.*\[/\]\\).*", "\\1", "")
    else
      let g:cmd_edited = substitute(g:cmd, "\\(.*\[\\\\]\\).*", "\\1", "")
    endif
    if g:cmd == g:cmd_edited
      if MySys() == "linux" || MySys() == "mac"
        let g:cmd_edited = substitute(g:cmd, "\\(.*\[/\]\\).*/", "\\1", "")
      else
        let g:cmd_edited = substitute(g:cmd, "\\(.*\[\\\\\]\\).*\[\\\\\]", "\\1", "")
      endif
    endif   
    return g:cmd_edited
  endfunc
  
  func! CurrentFileDir(cmd)
    return a:cmd . " " . expand("%:p:h") . "/"
  endfunc
  
  
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " =&gt; Moving around, tabs and buffers
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " Map space to / (search) and c-space to ? (backgwards search)
  map &lt;space&gt; /
  map &lt;c-space&gt; ?
  map &lt;silent&gt; &lt;leader&gt;&lt;cr&gt; :noh&lt;cr&gt;
  
  " Smart way to move btw. windows
  map &lt;C-j&gt; &lt;C-W&gt;j
  map &lt;C-k&gt; &lt;C-W&gt;k
  map &lt;C-h&gt; &lt;C-W&gt;h
  map &lt;C-l&gt; &lt;C-W&gt;l
  
  " Close the current buffer
  map &lt;leader&gt;bd :Bclose&lt;cr&gt;
  
  " Close all the buffers
  map &lt;leader&gt;ba :1,300 bd!&lt;cr&gt;
  
  " Use the arrows to something usefull
  map &lt;right&gt; :bn&lt;cr&gt;
  map &lt;left&gt; :bp&lt;cr&gt;
  
  " Tab configuration
  map &lt;leader&gt;tn :tabnew&lt;cr&gt;
  map &lt;leader&gt;te :tabedit 
  map &lt;leader&gt;tc :tabclose&lt;cr&gt;
  map &lt;leader&gt;tm :tabmove 
  
  " When pressing &lt;leader&gt;cd switch to the directory of the open buffer
  map &lt;leader&gt;cd :cd %:p:h&lt;cr&gt;
  
  
  command! Bclose call &lt;SID&gt;BufcloseCloseIt()
  function! &lt;SID&gt;BufcloseCloseIt()
     let l:currentBufNum = bufnr("%")
     let l:alternateBufNum = bufnr("#")
  
     if buflisted(l:alternateBufNum)
       buffer #
     else
       bnext
     endif
  
     if bufnr("%") == l:currentBufNum
       new
     endif
  
     if buflisted(l:currentBufNum)
       execute("bdelete! ".l:currentBufNum)
     endif
  endfunction
  
  " Specify the behavior when switching between buffers 
  try
    set switchbuf=usetab
    set stal=2
  catch
  endtry
  
  
  """"""""""""""""""""""""""""""
  " =&gt; Statusline
  """"""""""""""""""""""""""""""
  " Always hide the statusline
  set laststatus=2
  
  " Format the statusline
  set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{CurDir()}%h\ \ \ Line:\ %l/%L:%c
  
  
  function! CurDir()
      let curdir = substitute(getcwd(), '/Users/amir/', "~/", "g")
      return curdir
  endfunction
  
  function! HasPaste()
      if &amp;paste
          return 'PASTE MODE  '
      else
          return ''
      endif
  endfunction
  
  
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " =&gt; Parenthesis/bracket expanding
  """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  vnoremap $1 &lt;esc&gt;`&gt;a)&lt;esc&gt;`&lt;i(&lt;esc&gt;
  vnoremap $2 &lt;esc&gt;`&gt;a]&lt;esc&gt;`&lt;i[&lt;esc&gt;
  vnoremap $3 &lt;esc&gt;`&gt;a}&lt;esc&gt;`&lt;i{&lt;esc&gt;
  vnoremap $$ &lt;esc&gt;`&gt;a"&lt;esc&gt;`&lt;i"&lt;esc&gt;
  vnoremap $q &lt;esc&gt;`&gt;a'&lt;esc&gt;`&lt;i'&lt;esc&gt;
  vnoremap $e &lt;esc&gt;`&gt;a"&lt;esc&gt;`&lt;i"&lt;esc&gt;
  
  " Map auto complete of (, ", ', [
  inoremap $1 ()&lt;esc&gt;i
  inoremap $2 []&lt;esc&gt;i
  inoremap $3 {}&lt;esc&gt;i
  inoremap $4 {&lt;esc&gt;o}&lt;esc&gt;O
  inoremap $q ''&lt;esc&gt;i
  inoremap $e ""&lt;esc&gt;i
  inoremap $t &lt;&gt;&lt;esc&gt;i
  
  
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " =&gt; General Abbrevs
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  iab xdate &lt;c-r&gt;=strftime("%d/%m/%y %H:%M:%S")&lt;cr&gt;
  
  
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " =&gt; Editing mappings
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  "Remap VIM 0
  map 0 ^
  
  "Move a line of text using ALT+[jk] or Comamnd+[jk] on mac
  nmap &lt;M-j&gt; mz:m+&lt;cr&gt;`z
  nmap &lt;M-k&gt; mz:m-2&lt;cr&gt;`z
  vmap &lt;M-j&gt; :m'&gt;+&lt;cr&gt;`&lt;my`&gt;mzgv`yo`z
  vmap &lt;M-k&gt; :m'&lt;-2&lt;cr&gt;`&gt;my`&lt;mzgv`yo`z
  
  if MySys() == "mac"
    nmap &lt;D-j&gt; &lt;M-j&gt;
    nmap &lt;D-k&gt; &lt;M-k&gt;
    vmap &lt;D-j&gt; &lt;M-j&gt;
    vmap &lt;D-k&gt; &lt;M-k&gt;
  endif
  
  "Delete trailing white space, useful for Python ;)
  func! DeleteTrailingWS()
    exe "normal mz"
    %s/\s\+$//ge
    exe "normal `z"
  endfunc
  autocmd BufWrite *.py :call DeleteTrailingWS()
  
  set guitablabel=%t
  
  
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " =&gt; Cope
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " Do :help cope if you are unsure what cope is. It's super useful!
  map &lt;leader&gt;cc :botright cope&lt;cr&gt;
  map &lt;leader&gt;n :cn&lt;cr&gt;
  map &lt;leader&gt;p :cp&lt;cr&gt;
  
  
  """"""""""""""""""""""""""""""
  " =&gt; bufExplorer plugin
  """"""""""""""""""""""""""""""
  let g:bufExplorerDefaultHelp=0
  let g:bufExplorerShowRelativePath=1
  map &lt;leader&gt;o :BufExplorer&lt;cr&gt;
  
  
  """"""""""""""""""""""""""""""
  " =&gt; Minibuffer plugin
  """"""""""""""""""""""""""""""
  let g:miniBufExplModSelTarget = 1
  let g:miniBufExplorerMoreThanOne = 2
  let g:miniBufExplModSelTarget = 0
  let g:miniBufExplUseSingleClick = 1
  let g:miniBufExplMapWindowNavVim = 1
  let g:miniBufExplVSplit = 25
  let g:miniBufExplSplitBelow=1
  
  let g:bufExplorerSortBy = "name"
  
  autocmd BufRead,BufNew :call UMiniBufExplorer
  
  map &lt;leader&gt;u :TMiniBufExplorer&lt;cr&gt;
  
  
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " =&gt; Omni complete functions
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  autocmd FileType css set omnifunc=csscomplete#CompleteCSS
  
  
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " =&gt; Spell checking
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  "Pressing ,ss will toggle and untoggle spell checking
  map &lt;leader&gt;ss :setlocal spell!&lt;cr&gt;
  
  "Shortcuts using &lt;leader&gt;
  map &lt;leader&gt;sn ]s
  map &lt;leader&gt;sp [s
  map &lt;leader&gt;sa zg
  map &lt;leader&gt;s? z=
  
  
  """"""""""""""""""""""""""""""
  " =&gt; Python section
  """"""""""""""""""""""""""""""
  let python_highlight_all = 1
  au FileType python syn keyword pythonDecorator True None False self
  
  au BufNewFile,BufRead *.jinja set syntax=htmljinja
  au BufNewFile,BufRead *.mako set ft=mako
  
  au FileType python inoremap &lt;buffer&gt; $r return 
  au FileType python inoremap &lt;buffer&gt; $i import 
  au FileType python inoremap &lt;buffer&gt; $p print 
  au FileType python inoremap &lt;buffer&gt; $f #--- PH ----------------------------------------------&lt;esc&gt;FP2xi
  au FileType python map &lt;buffer&gt; &lt;leader&gt;1 /class 
  au FileType python map &lt;buffer&gt; &lt;leader&gt;2 /def 
  au FileType python map &lt;buffer&gt; &lt;leader&gt;C ?class 
  au FileType python map &lt;buffer&gt; &lt;leader&gt;D ?def 
  
  
  """"""""""""""""""""""""""""""
  " =&gt; JavaScript section
  """""""""""""""""""""""""""""""
  au FileType javascript call JavaScriptFold()
  au FileType javascript setl fen
  au FileType javascript setl nocindent
  
  au FileType javascript imap &lt;c-t&gt; AJS.log();&lt;esc&gt;hi
  au FileType javascript imap &lt;c-a&gt; alert();&lt;esc&gt;hi
  
  au FileType javascript inoremap &lt;buffer&gt; $r return 
  au FileType javascript inoremap &lt;buffer&gt; $f //--- PH ----------------------------------------------&lt;esc&gt;FP2xi
  
  function! JavaScriptFold() 
      setl foldmethod=syntax
      setl foldlevelstart=1
      syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend
  
      function! FoldText()
      return substitute(getline(v:foldstart), '{.*', '{...}', '')
      endfunction
      setl foldtext=FoldText()
  endfunction
  
  
  """"""""""""""""""""""""""""""
  " =&gt; MRU plugin
  """"""""""""""""""""""""""""""
  let MRU_Max_Entries = 400
  map &lt;leader&gt;f :MRU&lt;CR&gt;
  
  
  """"""""""""""""""""""""""""""
  " =&gt; Command-T
  """"""""""""""""""""""""""""""
  let g:CommandTMaxHeight = 15
  set wildignore+=*.o,*.obj,.git,*.pyc
  noremap &lt;leader&gt;j :CommandT&lt;cr&gt;
  noremap &lt;leader&gt;y :CommandTFlush&lt;cr&gt;
  
  
  """"""""""""""""""""""""""""""
  " =&gt; Vim grep
  """"""""""""""""""""""""""""""
  let Grep_Skip_Dirs = 'RCS CVS SCCS .svn generated'
  set grepprg=/bin/grep\ -nH
  
  
  
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " =&gt; MISC
  """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
  " Remove the Windows ^M - when the encodings gets messed up
  noremap &lt;Leader&gt;m mmHmt:%s/&lt;C-V&gt;&lt;cr&gt;//ge&lt;cr&gt;'tzt'm
  
  "Quickly open a buffer for scripbble
  map &lt;leader&gt;q :e ~/buffer&lt;cr&gt;
  au BufRead,BufNewFile ~/buffer iab &lt;buffer&gt; xh1 ===========================================
  
  map &lt;leader&gt;pp :setlocal paste!&lt;cr&gt;
  
  map &lt;leader&gt;bb :cd ..&lt;cr&gt;
  </code></pre>
  
  <p>From my understanding this should change from the default colors to <code>peaksea</code>, but this does not work...</p>
  
  <pre><code>if has("gui_running")
    set guioptions-=T
    set t_Co=256
    set background=dark
    colorscheme peaksea
    set nonu
  else
    colorscheme zellner
    set background=dark
  
    set nonu
  endif
  </code></pre>
  
  <p>to </p>
  
  <p>I have <code>peaksea</code> installed and working, but I would like it to start up as default. I would also like to have another font by default than fixedsys also (who decided to have that as default?!)</p>