Update runtime files

This commit is contained in:
Bram Moolenaar
2023-02-27 15:49:53 +00:00
parent 341f3876b3
commit dd60c365cd
35 changed files with 686 additions and 206 deletions

View File

@ -2,7 +2,7 @@
" Language: Rmd
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: Sun Mar 28, 2021 08:05PM
" Last Change: Wed Nov 09, 2022 09:44PM
" Only load this indent file when no other was loaded.
@ -16,6 +16,8 @@ let b:did_indent = 1
setlocal indentkeys=0{,0},<:>,!^F,o,O,e
setlocal indentexpr=GetRmdIndent()
let b:undo_indent = "setl inde< indk<"
if exists("*GetRmdIndent")
finish
endif
@ -47,6 +49,8 @@ function s:GetMdIndent()
return indent(v:lnum - 1) + 2
elseif pline =~ '^\s*\d\+\.\s\+'
return indent(v:lnum - 1) + 3
elseif pline =~ '^\[\^\S\+\]: '
return indent(v:lnum - 1) + shiftwidth()
endif
return indent(prevnonblank(v:lnum - 1))
endfunction