Mercurial > vim
diff runtime/indent/rmd.vim @ 6840:37828f7503c7
Updated runtime files.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 19 Jun 2015 13:27:23 +0200 |
parents | 0efec12f52ac |
children | da01d5da2cfa |
line wrap: on
line diff
--- a/runtime/indent/rmd.vim +++ b/runtime/indent/rmd.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: Rmd " Author: Jakson Alves de Aquino <jalvesaq@gmail.com> -" Last Change: Wed Jul 09, 2014 07:33PM +" Last Change: Thu Jul 10, 2014 07:11PM " Only load this indent file when no other was loaded. @@ -33,10 +33,10 @@ function GetMdIndent() endfunction function GetRmdIndent() - if getline(".") =~ '^```{r .*}$' || getline(".") =~ '^```$' + if getline(".") =~ '^[ \t]*```{r .*}$' || getline(".") =~ '^[ \t]*```$' return 0 endif - if search('^```{r', "bncW") > search('^```$', "bncW") + if search('^[ \t]*```{r', "bncW") > search('^[ \t]*```$', "bncW") return s:RIndent() else return GetMdIndent()