codekingpro/portable-devtools
114k
1" Vim indent file2" Language: Rnoweb3" Maintainer: This runtime file is looking for a new maintainer.4" Former Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>5" Former Repository: https://github.com/jalvesaq/R-Vim-runtime6" Last Change: 2024 Feb 27 07:17PM7" 2024 Feb 19 by Vim Project (announce adoption)8 9 10" Only load this indent file when no other was loaded.11if exists("b:did_indent")12 finish13endif14runtime indent/tex.vim15 16function s:NoTeXIndent()17 return indent(line("."))18endfunction19 20if &indentexpr == "" || &indentexpr == "GetRnowebIndent()"21 let s:TeXIndent = function("s:NoTeXIndent")22else23 let s:TeXIndent = function(substitute(&indentexpr, "()", "", ""))24endif25 26unlet! b:did_indent27runtime indent/r.vim28let s:RIndent = function(substitute(&indentexpr, "()", "", ""))29let b:did_indent = 130 31setlocal indentkeys=0{,0},!^F,o,O,e,},=\bibitem,=\item32setlocal indentexpr=GetRnowebIndent()33 34let b:undo_indent = "setl inde< indk<"35 36if exists("*GetRnowebIndent")37 finish38endif39 40function GetRnowebIndent()41 let curline = getline(".")42 if curline =~ '^<<.*>>=$' || curline =~ '^\s*@$'43 return 044 endif45 if search("^<<", "bncW") > search("^@", "bncW")46 return s:RIndent()47 endif48 return s:TeXIndent()49endfunction50 51" vim: sw=252 