annotate runtime/indent/framescript.vim @ 16293:c2b2201045e3 v8.1.1151

patch 8.1.1151: build fails when using shadow directory commit https://github.com/vim/vim/commit/679beba8007b804be210ef118bd23a38cb803ef6 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 11 16:21:33 2019 +0200 patch 8.1.1151: build fails when using shadow directory Problem: Build fails when using shadow directory. Solution: Link the desktop.in files.
author Bram Moolenaar <Bram@vim.org>
date Thu, 11 Apr 2019 16:30:05 +0200
parents d0a20101ecb2
children 9c221ad9634a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
1 " Vim indent file
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
2 " Language: FrameScript
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 1698
diff changeset
4 " Latest Revision: 2008-07-19
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
5
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
6 if exists("b:did_indent")
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
7 finish
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
8 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
9 let b:did_indent = 1
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
10
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
11 setlocal indentexpr=GetFrameScriptIndent()
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
12 setlocal indentkeys=!^F,o,O,0=~Else,0=~EndIf,0=~EndLoop,0=~EndSub
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
13 setlocal nosmartindent
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
14
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
15 if exists("*GetFrameScriptIndent")
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
16 finish
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
17 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
18
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
19 function GetFrameScriptIndent()
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
20 let lnum = prevnonblank(v:lnum - 1)
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
21
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
22 if lnum == 0
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
23 return 0
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
24 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
25
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
26 if getline(v:lnum) =~ '^\s*\*'
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
27 return cindent(v:lnum)
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
28 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
29
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
30 let ind = indent(lnum)
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
31
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
32 if getline(lnum) =~? '^\s*\%(If\|Loop\|Sub\)'
11160
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
33 let ind = ind + shiftwidth()
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
34 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
35
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
36 if getline(v:lnum) =~? '^\s*\%(Else\|End\%(If\|Loop\|Sub\)\)'
11160
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
37 let ind = ind - shiftwidth()
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
38 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
39
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
40 return ind
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
41 endfunction