Mercurial > vim
annotate runtime/indent/teraterm.vim @ 33293:42b89193ab3e v9.0.1912
patch 9.0.1912: Cirrus-CI running out of credits
Commit: https://github.com/vim/vim/commit/6f00d17e8d64ed46c85625e8ac38ed0928b32c58
Author: Christian Brabandt <cb@256bit.org>
Date: Tue Sep 19 20:16:46 2023 +0200
patch 9.0.1912: Cirrus-CI running out of credits
Problem: Cirrus-CI running out of credits
Solution: disable Cirrus-CI for now
We are running out of credits for Cirrus CI already at the middle of the
month and unfortunately this means our CI now consistently fails. This
all hapens because cirrus ci is not enforcing the free-tier limits (see also
https://cirrus-ci.org/blog/2023/07/17/limiting-free-usage-of-cirrus-ci/).
Perhaps at the beginning of the next month we can revisit and
enable just a build without testing it. Hopefully this is won't take
too many credits and we can at least verify that building works.
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 19 Sep 2023 20:30:10 +0200 |
parents | ebedba7a4898 |
children |
rev | line source |
---|---|
6951 | 1 " Vim indent file |
2 " Language: Tera Term Language (TTL) | |
14668 | 3 " Based on Tera Term Version 4.100 |
6951 | 4 " Maintainer: Ken Takata |
5 " URL: https://github.com/k-takata/vim-teraterm | |
26050 | 6 " Last Change: 2021-10-18 |
6951 | 7 " Filenames: *.ttl |
8 " License: VIM License | |
9 | |
10 if exists("b:did_indent") | |
11 finish | |
12 endif | |
13 let b:did_indent = 1 | |
14 | |
15 setlocal nosmartindent | |
16 setlocal noautoindent | |
17 setlocal indentexpr=GetTeraTermIndent(v:lnum) | |
18 setlocal indentkeys=!^F,o,O,e | |
19 setlocal indentkeys+==elseif,=endif,=loop,=next,=enduntil,=endwhile | |
20 | |
26050 | 21 let b:undo_indent = "setl ai< inde< indk< si<" |
22 | |
6951 | 23 if exists("*GetTeraTermIndent") |
24 finish | |
25 endif | |
26 | |
27 function! GetTeraTermIndent(lnum) | |
28 let l:prevlnum = prevnonblank(a:lnum-1) | |
29 if l:prevlnum == 0 | |
30 " top of file | |
31 return 0 | |
32 endif | |
33 | |
34 " grab the previous and current line, stripping comments. | |
35 let l:prevl = substitute(getline(l:prevlnum), ';.*$', '', '') | |
36 let l:thisl = substitute(getline(a:lnum), ';.*$', '', '') | |
37 let l:previ = indent(l:prevlnum) | |
38 | |
39 let l:ind = l:previ | |
40 | |
9908
2b6654519a7c
commit https://github.com/vim/vim/commit/7571d55f7dcc009a375b2124cce2c8b21f361234
Christian Brabandt <cb@256bit.org>
parents:
6951
diff
changeset
|
41 if l:prevl =~ '^\s*if\>.*\<then\>' |
6951 | 42 " previous line opened a block |
11518 | 43 let l:ind += shiftwidth() |
6951 | 44 endif |
45 if l:prevl =~ '^\s*\%(elseif\|else\|do\|until\|while\|for\)\>' | |
46 " previous line opened a block | |
11518 | 47 let l:ind += shiftwidth() |
6951 | 48 endif |
49 if l:thisl =~ '^\s*\%(elseif\|else\|endif\|enduntil\|endwhile\|loop\|next\)\>' | |
50 " this line closed a block | |
11518 | 51 let l:ind -= shiftwidth() |
6951 | 52 endif |
53 | |
54 return l:ind | |
55 endfunction | |
56 | |
57 " vim: ts=8 sw=2 sts=2 |