mirror of
https://github.com/neovim/neovim.git
synced 2026-01-05 10:57:11 +10:00
This reverts commits:
- 6b652a785033fd4164e049492a7327c1ed7c3e5f
- 2f689d5abde0ccddca9e20d8c93a0299bd054e32
- a025a46d4169587145fb54f04af349cd05cb6122
Several email addresses that are known to be valid caused bounces
due to an issue with my email setup. The previous commits incorrectly
marked these addresses as invalid. So revert the whole thing again.
62d8f3dab5
N/A patch:
vim-patch:2f689d5: runtime: mark more invalid email addresses
Co-authored-by: Christian Brabandt <cb@256bit.org>
64 lines
1.8 KiB
VimL
64 lines
1.8 KiB
VimL
" 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
|