annotate runtime/indent/rnoweb.vim @ 7564:aee06f1762e0 v7.4.1082

commit https://github.com/vim/vim/commit/858b96f382eeb8f1eab5100639e7b09523a6a2a1 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 10 16:12:24 2016 +0100 patch 7.4.1082 Problem: The Tcl interface is always skipping memory free on exit. Solution: Only skip for dynamically loaded Tcl.
author Christian Brabandt <cb@256bit.org>
date Sun, 10 Jan 2016 16:15:06 +0100
parents 37828f7503c7
children da01d5da2cfa
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
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 " Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
6840
37828f7503c7 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6051
diff changeset
4 " Last Change: Sun Mar 22, 2015 09:28AM
6051
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 " Only load this indent file when no other was loaded.
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 if exists("b:did_indent")
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 finish
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 endif
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 runtime indent/tex.vim
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 let s:TeXIndent = function(substitute(&indentexpr, "()", "", ""))
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 unlet b:did_indent
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 runtime indent/r.vim
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 let b:did_indent = 1
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 setlocal indentkeys=0{,0},!^F,o,O,e,},=\bibitem,=\item
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 setlocal indentexpr=GetRnowebIndent()
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 if exists("*GetRnowebIndent")
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 finish
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 endif
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 function GetRnowebIndent()
6840
37828f7503c7 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6051
diff changeset
26 let curline = getline(".")
37828f7503c7 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6051
diff changeset
27 if curline =~ '^<<.*>>=$' || curline =~ '^\s*@$'
6051
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 return 0
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 endif
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 if search("^<<", "bncW") > search("^@", "bncW")
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 return s:RIndent()
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 endif
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 return s:TeXIndent()
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 endfunction
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 " vim: sw=2