title: in vimrc apply certain highlighting rules only for certain filetype
body: <p>in my vimrc I have a script that transform a text in bold when banded between * * double stars * * (like it does in this editor actually), but i don't want it to apply on my js or c or any programming files of course, so i tried to make it run only when it's a .txt file :</p>
  
  <pre><code>if (&amp;filetype=='text')
      set concealcursor=n
      set conceallevel=3
      hi AsteriskBold ctermfg=Green cterm=bold
      autocmd BufEnter * syn match Asterisks contained "**" conceal
      autocmd BufEnter * syn match AsteriskBold "\*\*.*\*\*" contains=Asterisks
  endif
  </code></pre>
  
  <p>but obviously the condition of the "if" doesn't work since this rules doesn't apply anymore in none of my file, text or not</p>
  
  <p>EDIT => SOLUTION</p>
  
  <p>after reading the answers I choose this solution, in my vimrc (even though it's not the best way vim works as explaind by ingo)</p>
  
  <pre><code>au BufEnter *.txt setf text "(set a filetype unless it already exist)
  au filetype text set cocu=n cole=3
  au filetype text hi AsteriskBold ctermfg=Green cterm=bold
  au filetype text syn match Asterisks contained "**" conceal
  au filetype text syn match AsteriskBold "\*\*.*\*\*" contains=Asterisks
  </code></pre>