robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
9bb046d1be
master
1" Vim indent file 2" Language: Rnoweb 3" 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-runtime 6" Last Change: 2024 Feb 27 07:17PM 7" 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" ) 12finish 13endif 14runtime indent/tex.vim 15 16function s: NoTeXIndent () 17return indent ( line ( "." )) 18endfunction 19 20if & indentexpr == "" || & indentexpr == "GetRnowebIndent()" 21let s: TeXIndent = function ( "s:NoTeXIndent" ) 22else 23let s: TeXIndent = function ( substitute ( & indentexpr , "()" , "" , "" )) 24endif 25 26unlet ! b: did_indent 27runtime indent/r.vim 28let s: RIndent = function ( substitute ( & indentexpr , "()" , "" , "" )) 29let b: did_indent = 1 30 31setlocal indentkeys = 0{,0},!^F,o,O,e,},=\bibitem,=\item 32setlocal indentexpr = GetRnowebIndent () 33 34let b: undo_indent = "setl inde< indk<" 35 36if exists ( "*GetRnowebIndent" ) 37finish 38endif 39 40function GetRnowebIndent () 41let curline = getline ( "." ) 42if curline =~ '^<<.*>>=$' || curline =~ '^\s*@$' 43return 0 44endif 45if search ( "^<<" , "bncW" ) > search ( "^@" , "bncW" ) 46return s: RIndent () 47endif 48return s: TeXIndent () 49endfunction 50 51" vim: sw=2