annotate runtime/indent/eterm.vim @ 21705:516176f1a3e9 v8.2.1402

patch 8.2.1402: s390x tests always fail Commit: https://github.com/vim/vim/commit/94f6c06ac54401ea34a07f8c45242f11bd1e1e3a Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 9 14:07:52 2020 +0200 patch 8.2.1402: s390x tests always fail Problem: s390x tests always fail. Solution: Temporarily disable s390x tests.
author Bram Moolenaar <Bram@vim.org>
date Sun, 09 Aug 2020 14:15:05 +0200
parents d0a20101ecb2
children 9c221ad9634a
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: 1207
diff changeset
2 " Language: Eterm configuration file
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 1207
diff changeset
3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 1207
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=GetEtermIndent()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 setlocal indentkeys=!^F,o,O,=end
1207
beed57a8fcd1 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("*GetEtermIndent")
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 GetEtermIndent()
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 if lnum == 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 return 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 let ind = indent(lnum)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
27 if getline(lnum) =~ '^\s*begin\>'
11160
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
28 let ind = ind + shiftwidth()
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 endif
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(v:lnum) =~ '^\s*end\>'
11160
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
32 let ind = ind - shiftwidth()
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 return ind
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 endfunction