title: Emacs automode for R markdown files
body: <p>I am trying to automatically associate R markdown files (<code>.Rmd</code> and <code>.rmd</code>) with markdown-mode in spacemacs, also enabling markdown preview.</p>
  
  <p>I have tried a number of variations, none of which worked. here is one of the latest:</p>
  
  <pre><code>   (use-package markdown-mode
      :ensure t
      :commands (markdown-mode gfm-mode)
      :mode (("README\\.md\\'" . gfm-mode)
             ("\\.md\\'" . markdown-mode)
             ("\\.rmd\\'" . markdown-mode)
             ("\\.Rmd\\'" . markdown-mode)
             ("\\.markdown\\'" . markdown-mode))
      :init (setq markdown-command "multimarkdown"))
  </code></pre>
  
  <p>Any suggestions on what I might be doing wrong?</p>