annotate runtime/indent/rnoweb.vim @ 34375:02bd0fe77c68

runtime(misc): announce adoption of various runtime files Commit: https://github.com/vim/vim/commit/f9ca139e3aa12dd03177ebba5eedcee4f0836f27 Author: Christian Brabandt <cb@256bit.org> Date: Mon Feb 19 20:37:11 2024 +0100 runtime(misc): announce adoption of various runtime files Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Mon, 19 Feb 2024 21:00:10 +0100
parents b2e8663e6dcc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6051
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 " Vim indent file
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 " Language: Rnoweb
34375
02bd0fe77c68 runtime(misc): announce adoption of various runtime files
Christian Brabandt <cb@256bit.org>
parents: 32294
diff changeset
3 " Maintainer: This runtime file is looking for a new maintainer.
02bd0fe77c68 runtime(misc): announce adoption of various runtime files
Christian Brabandt <cb@256bit.org>
parents: 32294
diff changeset
4 " Former Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
02bd0fe77c68 runtime(misc): announce adoption of various runtime files
Christian Brabandt <cb@256bit.org>
parents: 32294
diff changeset
5 " Former Repository: https://github.com/jalvesaq/R-Vim-runtime
02bd0fe77c68 runtime(misc): announce adoption of various runtime files
Christian Brabandt <cb@256bit.org>
parents: 32294
diff changeset
6 " Last Change: 2024 Feb 27 07:17PM
02bd0fe77c68 runtime(misc): announce adoption of various runtime files
Christian Brabandt <cb@256bit.org>
parents: 32294
diff changeset
7 " 2024 Feb 19 by Vim Project (announce adoption)
6051
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 " Only load this indent file when no other was loaded.
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 if exists("b:did_indent")
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 finish
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 endif
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 runtime indent/tex.vim
9975
03fa8a51e9dc commit https://github.com/vim/vim/commit/e4a3bcf28d92d0bde9ca227ccb40d401038185e5
Christian Brabandt <cb@256bit.org>
parents: 8497
diff changeset
15
32294
b2e8663e6dcc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 32061
diff changeset
16 function s:NoTeXIndent()
9975
03fa8a51e9dc commit https://github.com/vim/vim/commit/e4a3bcf28d92d0bde9ca227ccb40d401038185e5
Christian Brabandt <cb@256bit.org>
parents: 8497
diff changeset
17 return indent(line("."))
03fa8a51e9dc commit https://github.com/vim/vim/commit/e4a3bcf28d92d0bde9ca227ccb40d401038185e5
Christian Brabandt <cb@256bit.org>
parents: 8497
diff changeset
18 endfunction
03fa8a51e9dc commit https://github.com/vim/vim/commit/e4a3bcf28d92d0bde9ca227ccb40d401038185e5
Christian Brabandt <cb@256bit.org>
parents: 8497
diff changeset
19
03fa8a51e9dc commit https://github.com/vim/vim/commit/e4a3bcf28d92d0bde9ca227ccb40d401038185e5
Christian Brabandt <cb@256bit.org>
parents: 8497
diff changeset
20 if &indentexpr == "" || &indentexpr == "GetRnowebIndent()"
03fa8a51e9dc commit https://github.com/vim/vim/commit/e4a3bcf28d92d0bde9ca227ccb40d401038185e5
Christian Brabandt <cb@256bit.org>
parents: 8497
diff changeset
21 let s:TeXIndent = function("s:NoTeXIndent")
03fa8a51e9dc commit https://github.com/vim/vim/commit/e4a3bcf28d92d0bde9ca227ccb40d401038185e5
Christian Brabandt <cb@256bit.org>
parents: 8497
diff changeset
22 else
03fa8a51e9dc commit https://github.com/vim/vim/commit/e4a3bcf28d92d0bde9ca227ccb40d401038185e5
Christian Brabandt <cb@256bit.org>
parents: 8497
diff changeset
23 let s:TeXIndent = function(substitute(&indentexpr, "()", "", ""))
03fa8a51e9dc commit https://github.com/vim/vim/commit/e4a3bcf28d92d0bde9ca227ccb40d401038185e5
Christian Brabandt <cb@256bit.org>
parents: 8497
diff changeset
24 endif
03fa8a51e9dc commit https://github.com/vim/vim/commit/e4a3bcf28d92d0bde9ca227ccb40d401038185e5
Christian Brabandt <cb@256bit.org>
parents: 8497
diff changeset
25
14637
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 9975
diff changeset
26 unlet! b:did_indent
6051
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 runtime indent/r.vim
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 let b:did_indent = 1
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 setlocal indentkeys=0{,0},!^F,o,O,e,},=\bibitem,=\item
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 setlocal indentexpr=GetRnowebIndent()
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33
32061
b2412874362f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14637
diff changeset
34 let b:undo_indent = "setl inde< indk<"
b2412874362f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14637
diff changeset
35
6051
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 if exists("*GetRnowebIndent")
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 finish
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 endif
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 function GetRnowebIndent()
6840
37828f7503c7 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6051
diff changeset
41 let curline = getline(".")
37828f7503c7 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6051
diff changeset
42 if curline =~ '^<<.*>>=$' || curline =~ '^\s*@$'
6051
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 return 0
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 endif
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 if search("^<<", "bncW") > search("^@", "bncW")
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 return s:RIndent()
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 endif
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 return s:TeXIndent()
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 endfunction
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 " vim: sw=2