Update runtime files
diff --git a/runtime/indent/quarto.vim b/runtime/indent/quarto.vim
new file mode 100644
index 0000000..586d232
--- /dev/null
+++ b/runtime/indent/quarto.vim
@@ -0,0 +1 @@
+runtime indent/rmd.vim
diff --git a/runtime/indent/r.vim b/runtime/indent/r.vim
index ca85a2e..293dd98 100644
--- a/runtime/indent/r.vim
+++ b/runtime/indent/r.vim
@@ -2,7 +2,7 @@
" Language: R
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Sun Aug 19, 2018 09:13PM
+" Last Change: Wed Oct 26, 2022 12:04PM
" Only load this indent file when no other was loaded.
@@ -14,6 +14,8 @@
setlocal indentkeys=0{,0},:,!^F,o,O,e
setlocal indentexpr=GetRIndent()
+let b:undo_indent = "setl inde< indk<"
+
" Only define the function once.
if exists("*GetRIndent")
finish
@@ -28,7 +30,7 @@
let g:r_indent_comment_column = get(g:, 'r_indent_comment_column', 40)
let g:r_indent_ess_compatible = get(g:, 'r_indent_ess_compatible', 0)
let g:r_indent_op_pattern = get(g:, 'r_indent_op_pattern',
- \ '\(&\||\|+\|-\|\*\|/\|=\|\~\|%\|->\)\s*$')
+ \ '\(&\||\|+\|-\|\*\|/\|=\|\~\|%\|->\||>\)\s*$')
function s:RDelete_quotes(line)
let i = 0
@@ -359,17 +361,19 @@
let olnum = s:Get_prev_line(lnum)
let oline = getline(olnum)
if olnum > 0
- if line =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
- if oline =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
+ if substitute(line, '#.*', '', '') =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
+ if substitute(oline, '#.*', '', '') =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
return indent(lnum)
else
return indent(lnum) + shiftwidth()
endif
else
- if oline =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
+ if substitute(oline, '#.*', '', '') =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
return indent(lnum) - shiftwidth()
endif
endif
+ elseif substitute(line, '#.*', '', '') =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
+ return indent(lnum) + shiftwidth()
endif
let post_fun = 0
diff --git a/runtime/indent/rhelp.vim b/runtime/indent/rhelp.vim
index cf69ae3..f68c090 100644
--- a/runtime/indent/rhelp.vim
+++ b/runtime/indent/rhelp.vim
@@ -2,7 +2,7 @@
" Language: R Documentation (Help), *.Rd
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Tue Apr 07, 2015 04:38PM
+" Last Change: Feb 25, 2023
" Only load this indent file when no other was loaded.
@@ -20,6 +20,8 @@
setlocal indentkeys=0{,0},:,!^F,o,O,e
setlocal indentexpr=GetCorrectRHelpIndent()
+let b:undo_indent = "setl ai< cin< inde< indk< <lisp <si"
+
" Only define the functions once.
if exists("*GetRHelpIndent")
finish
diff --git a/runtime/indent/rmd.vim b/runtime/indent/rmd.vim
index 8fd5725..a043b0c 100644
--- a/runtime/indent/rmd.vim
+++ b/runtime/indent/rmd.vim
@@ -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 @@
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 @@
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
diff --git a/runtime/indent/rnoweb.vim b/runtime/indent/rnoweb.vim
index 7396686..33bc103 100644
--- a/runtime/indent/rnoweb.vim
+++ b/runtime/indent/rnoweb.vim
@@ -2,7 +2,7 @@
" Language: Rnoweb
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Fri Apr 15, 2016 10:58PM
+" Last Change: Feb 25, 2023
" Only load this indent file when no other was loaded.
@@ -29,6 +29,8 @@
setlocal indentkeys=0{,0},!^F,o,O,e,},=\bibitem,=\item
setlocal indentexpr=GetRnowebIndent()
+let b:undo_indent = "setl inde< indk<"
+
if exists("*GetRnowebIndent")
finish
endif
diff --git a/runtime/indent/rrst.vim b/runtime/indent/rrst.vim
index f3ee53e..585c5e6 100644
--- a/runtime/indent/rrst.vim
+++ b/runtime/indent/rrst.vim
@@ -2,7 +2,7 @@
" Language: Rrst
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
-" Last Change: Tue Apr 07, 2015 04:38PM
+" Last Change: Feb 25, 2023
" Only load this indent file when no other was loaded.
@@ -16,6 +16,8 @@
setlocal indentkeys=0{,0},:,!^F,o,O,e
setlocal indentexpr=GetRrstIndent()
+let b:undo_indent = "setl inde< indk<"
+
if exists("*GetRrstIndent")
finish
endif