title: Colorscheme change when filetype changes
body: <p>Is it possible to change the colorscheme in Vim  when I open a .vim, .htm, .html, .xml or the _vimrc file?
  (also change colorscheme when I switch to an already open file with above extension)</p>
  
  <p>This is what I want my vim to do:</p>
  
  <p>file = txt or a new (not saved) buffer: colorscheme1 (default colorscheme)<br>
  file = vimrc, vim, html, htm: colorscheme2   </p>
  
  <p>I noted also that my vim doesn't detect all filetypes.<br>
  Text files are not recognized as text file.</p>
  
  <p>ps:<br>
  If this is not possible would it be possible to switch to another colorscheme and keep it when I restart VIM (without changing something in vimrc)?</p>
  
  <hr>
  
  <p><b>edit</b>:</p>
  
  <p>Found the solution with an autocmd:</p>
  
  <pre><code>augroup filetype_colorscheme
      au BufEnter *
      \ if !exists('b:colors_name')
          \ | if &amp;ft == "vim" || &amp;ft == "html"
              \ | let b:colors_name = 'colorscheme 2'
          \ | else
              \ | let b:colors_name = 'colorscheme 1'
          \ | endif
      \ | endif
      \ | exe 'colorscheme' b:colors_name
  augroup END 
  </code></pre>
  
  <p><i><b>still one problem</b>:<br>
    above code changes the colorscheme of all files in a split window when I click in a buffer</i><br>
    Is there a way to desactivate (and reactivate) an autocmd using a shortcut key?</p>