annotate runtime/indent/xf86conf.vim @ 24010:c9849ed1ce05 v8.2.2547

patch 8.2.2547: "%" command not accurate for big files Commit: https://github.com/vim/vim/commit/2c6553498e790604f50016d8435403523a2576d6 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 23 19:32:03 2021 +0100 patch 8.2.2547: "%" command not accurate for big files Problem: "%" command not accurate for big files. Solution: Make it more accurate for files up to 21M lines. (Dominique Pell?, closes #7889)
author Bram Moolenaar <Bram@vim.org>
date Tue, 23 Feb 2021 19:45:04 +0100
parents d0a20101ecb2
children 4d76b3e07c07
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim indent file
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 1224
diff changeset
2 " Language: XFree86 Configuration File
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 1224
diff changeset
3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 1224
diff changeset
4 " Latest Revision: 2006-12-20
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 if exists("b:did_indent")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 let b:did_indent = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 setlocal indentexpr=GetXF86ConfIndent()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 setlocal indentkeys=!^F,o,O,=End
1224
edc1c9d6dab9 updated for version 7.1b
vimboss
parents: 856
diff changeset
13 setlocal nosmartindent
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 if exists("*GetXF86ConfIndent")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 function GetXF86ConfIndent()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 let lnum = prevnonblank(v:lnum - 1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 if lnum == 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 return 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 let ind = indent(lnum)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
28 if getline(lnum) =~? '^\s*\(Sub\)\=Section\>'
11160
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
29 let ind = ind + shiftwidth()
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
30 endif
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
31
1224
edc1c9d6dab9 updated for version 7.1b
vimboss
parents: 856
diff changeset
32 if getline(v:lnum) =~? '^\s*End\(Sub\)\=Section\>'
11160
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
33 let ind = ind - shiftwidth()
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 return ind
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 endfunction