annotate runtime/indent/xf86conf.vim @ 29391:73fb9c6efc6d v9.0.0038

patch 9.0.0038: 'listchars' test fails Commit: https://github.com/vim/vim/commit/5ed26faace574f6b36744f9e17075d7e806aa877 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jul 4 18:05:51 2022 +0100 patch 9.0.0038: 'listchars' test fails Problem: 'listchars' test fails. Solution: Use window-local value after setting the global value
author Bram Moolenaar <Bram@vim.org>
date Mon, 04 Jul 2022 19:15:03 +0200
parents 4d76b3e07c07
children
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
28620
4d76b3e07c07 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11160
diff changeset
2 " Language: XFree86 Configuration File
4d76b3e07c07 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11160
diff changeset
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
4d76b3e07c07 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11160
diff changeset
4 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
4d76b3e07c07 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11160
diff changeset
5 " Last Change: 2022 April 25
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 if exists("b:did_indent")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 let b:did_indent = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 setlocal indentexpr=GetXF86ConfIndent()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 setlocal indentkeys=!^F,o,O,=End
1224
edc1c9d6dab9 updated for version 7.1b
vimboss
parents: 856
diff changeset
14 setlocal nosmartindent
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
28620
4d76b3e07c07 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11160
diff changeset
16 let b:undo_indent = "setl inde< indk< si<"
4d76b3e07c07 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11160
diff changeset
17
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 if exists("*GetXF86ConfIndent")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 function GetXF86ConfIndent()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 let lnum = prevnonblank(v:lnum - 1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 if lnum == 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 return 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 let ind = indent(lnum)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
31 if getline(lnum) =~? '^\s*\(Sub\)\=Section\>'
11160
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
32 let ind = ind + shiftwidth()
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
33 endif
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
34
1224
edc1c9d6dab9 updated for version 7.1b
vimboss
parents: 856
diff changeset
35 if getline(v:lnum) =~? '^\s*End\(Sub\)\=Section\>'
11160
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
36 let ind = ind - shiftwidth()
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 return ind
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 endfunction