summaryrefslogtreecommitdiff
path: root/runtime/indent
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2023-04-22 22:40:14 +0100
committerBram Moolenaar <Bram@vim.org>2023-04-22 22:40:14 +0100
commit71badf9547e8f89571b9a095183671cbb333d528 (patch)
tree60d0393cb0236345eb4b5d26f98c8c9d030ce8b0 /runtime/indent
parent80406c26188219f3773b2e9c49160caeeb386ee2 (diff)
downloadvim-git-71badf9547e8f89571b9a095183671cbb333d528.tar.gz
Update runtime files
Diffstat (limited to 'runtime/indent')
-rw-r--r--runtime/indent/livebook.vim9
-rw-r--r--runtime/indent/r.vim10
-rw-r--r--runtime/indent/rhelp.vim4
-rw-r--r--runtime/indent/rnoweb.vim4
4 files changed, 18 insertions, 9 deletions
diff --git a/runtime/indent/livebook.vim b/runtime/indent/livebook.vim
new file mode 100644
index 000000000..6311050e0
--- /dev/null
+++ b/runtime/indent/livebook.vim
@@ -0,0 +1,9 @@
+" Placeholder livebook indent file.
+" This simply uses the markdown indenting.
+
+" Only load this indent file when no other was loaded.
+if exists("b:did_indent")
+ finish
+endif
+
+runtime! indent/markdown.vim
diff --git a/runtime/indent/r.vim b/runtime/indent/r.vim
index 293dd9817..07dfd1388 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: Wed Oct 26, 2022 12:04PM
+" Last Change: Mon Feb 27, 2023 07:16PM
" Only load this indent file when no other was loaded.
@@ -110,7 +110,7 @@ function s:RDelete_parens(line)
return line1
endfunction
-function! s:Get_paren_balance(line, o, c)
+function s:Get_paren_balance(line, o, c)
let line2 = substitute(a:line, a:o, "", "g")
let openp = strlen(a:line) - strlen(line2)
let line3 = substitute(line2, a:c, "", "g")
@@ -118,7 +118,7 @@ function! s:Get_paren_balance(line, o, c)
return openp - closep
endfunction
-function! s:Get_matching_brace(linenr, o, c, delbrace)
+function s:Get_matching_brace(linenr, o, c, delbrace)
let line = SanitizeRLine(getline(a:linenr))
if a:delbrace == 1
let line = substitute(line, '{$', "", "")
@@ -134,7 +134,7 @@ endfunction
" This function is buggy because there 'if's without 'else'
" It must be rewritten relying more on indentation
-function! s:Get_matching_if(linenr, delif)
+function s:Get_matching_if(linenr, delif)
let line = SanitizeRLine(getline(a:linenr))
if a:delif
let line = substitute(line, "if", "", "g")
@@ -162,7 +162,7 @@ function! s:Get_matching_if(linenr, delif)
endif
endfunction
-function! s:Get_last_paren_idx(line, o, c, pb)
+function s:Get_last_paren_idx(line, o, c, pb)
let blc = a:pb
let line = substitute(a:line, '\t', s:curtabstop, "g")
let theidx = -1
diff --git a/runtime/indent/rhelp.vim b/runtime/indent/rhelp.vim
index f68c09076..334802ab7 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: Feb 25, 2023
+" Last Change: Mon Feb 27, 2023 07:01PM
" Only load this indent file when no other was loaded.
@@ -20,7 +20,7 @@ setlocal nolisp
setlocal indentkeys=0{,0},:,!^F,o,O,e
setlocal indentexpr=GetCorrectRHelpIndent()
-let b:undo_indent = "setl ai< cin< inde< indk< <lisp <si"
+let b:undo_indent = "setl ai< cin< inde< indk< lisp< si<"
" Only define the functions once.
if exists("*GetRHelpIndent")
diff --git a/runtime/indent/rnoweb.vim b/runtime/indent/rnoweb.vim
index 33bc103d1..668cdb7dd 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: Feb 25, 2023
+" Last Change: Mon Feb 27, 2023 07:17PM
" Only load this indent file when no other was loaded.
@@ -11,7 +11,7 @@ if exists("b:did_indent")
endif
runtime indent/tex.vim
-function! s:NoTeXIndent()
+function s:NoTeXIndent()
return indent(line("."))
endfunction