annotate runtime/indent/framescript.vim @ 30996:d5a56c991218 v9.0.0833

patch 9.0.0833: Mac: no +sound feature in huge build Commit: https://github.com/vim/vim/commit/25b8420c2b4c65f8e0292fbc006db1ea12d4b1c6 Author: Yee Cheng Chin <ychin.git@gmail.com> Date: Sat Nov 5 14:23:14 2022 +0000 patch 9.0.0833: Mac: no +sound feature in huge build Problem: Mac: no +sound feature in huge build. Solution: Enable +sound in Mac huge build. (closes https://github.com/vim/vim/issues/11497)
author Bram Moolenaar <Bram@vim.org>
date Sat, 05 Nov 2022 15:30:04 +0100
parents 9c221ad9634a
children
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
25880
9c221ad9634a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11160
diff changeset
2 " Language: FrameScript
9c221ad9634a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11160
diff changeset
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
9c221ad9634a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11160
diff changeset
4 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
9c221ad9634a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11160
diff changeset
5 " Last Change: 24 Sep 2021
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
6
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
7 if exists("b:did_indent")
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
8 finish
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
9 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
10 let b:did_indent = 1
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
11
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
12 setlocal indentexpr=GetFrameScriptIndent()
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
13 setlocal indentkeys=!^F,o,O,0=~Else,0=~EndIf,0=~EndLoop,0=~EndSub
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
14 setlocal nosmartindent
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
15
25880
9c221ad9634a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11160
diff changeset
16 let b:undo_indent = "setl inde< indk< si<"
9c221ad9634a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11160
diff changeset
17
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
18 if exists("*GetFrameScriptIndent")
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
19 finish
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
20 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
21
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
22 function GetFrameScriptIndent()
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
23 let lnum = prevnonblank(v:lnum - 1)
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
24
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
25 if lnum == 0
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
26 return 0
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
27 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
28
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
29 if getline(v:lnum) =~ '^\s*\*'
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
30 return cindent(v:lnum)
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
31 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
32
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
33 let ind = indent(lnum)
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
34
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
35 if getline(lnum) =~? '^\s*\%(If\|Loop\|Sub\)'
11160
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
36 let ind = ind + shiftwidth()
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
37 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
38
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
39 if getline(v:lnum) =~? '^\s*\%(Else\|End\%(If\|Loop\|Sub\)\)'
11160
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
40 let ind = ind - shiftwidth()
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
41 endif
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
42
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
43 return ind
f4f8014d516e updated for version 7.2c-000
vimboss
parents:
diff changeset
44 endfunction