Mercurial > vim
view runtime/indent/rpl.vim @ 34259:70c1a9c6f41d v9.1.0070
patch 9.1.0070: CI: testsuite not run on M1 Mac
Commit: https://github.com/vim/vim/commit/e93d5cadec6323d6be90f1ec29066441ffbc9477
Author: rhysd <lin90162@yahoo.co.jp>
Date: Thu Feb 1 21:22:14 2024 +0100
patch 9.1.0070: CI: testsuite not run on M1 Mac
Problem: CI: testsuite not run on M1 Mac
Solution: Make it run on gh runners for M1, disable failing tests for
now, until we figure the problem with the failings tests out
(rhysd)
closes: #13943
Signed-off-by: rhysd <lin90162@yahoo.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 01 Feb 2024 21:30:03 +0100 |
parents | 5b7ea82bc18f |
children |
line wrap: on
line source
" Vim indent file " Language: RPL/2 " Version: 0.2 " Last Change: 2017 Jun 13 " Maintainer: BERTRAND Joël <rpl2@free.fr> " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal autoindent setlocal indentkeys+==~end,=~case,=~if,=~then,=~else,=~do,=~until,=~while,=~repeat,=~select,=~default,=~for,=~start,=~next,=~step,<<>,<>> " Define the appropriate indent function but only once setlocal indentexpr=RplGetFreeIndent() if exists("*RplGetFreeIndent") finish endif let b:undo_indent = "set ai< indentkeys< indentexpr<" function RplGetIndent(lnum) let ind = indent(a:lnum) let prevline=getline(a:lnum) " Strip tail comment let prevstat=substitute(prevline, '!.*$', '', '') " Add a shiftwidth to statements following if, iferr, then, else, elseif, " case, select, default, do, until, while, repeat, for, start if prevstat =~? '\<\(if\|iferr\|do\|while\)\>' && prevstat =~? '\<end\>' elseif prevstat =~? '\(^\|\s\+\)<<\($\|\s\+\)' && prevstat =~? '\s\+>>\($\|\s\+\)' elseif prevstat =~? '\<\(if\|iferr\|then\|else\|elseif\|select\|case\|do\|until\|while\|repeat\|for\|start\|default\)\>' || prevstat =~? '\(^\|\s\+\)<<\($\|\s\+\)' let ind = ind + shiftwidth() endif " Subtract a shiftwidth from then, else, elseif, end, until, repeat, next, " step let line = getline(v:lnum) if line =~? '^\s*\(then\|else\|elseif\|until\|repeat\|next\|step\|default\|end\)\>' let ind = ind - shiftwidth() elseif line =~? '^\s*>>\($\|\s\+\)' let ind = ind - shiftwidth() endif return ind endfunction function RplGetFreeIndent() " Find the previous non-blank line let lnum = prevnonblank(v:lnum - 1) " Use zero indent at the top of the file if lnum == 0 return 0 endif let ind=RplGetIndent(lnum) return ind endfunction " vim:sw=2 tw=130