Mercurial > vim
view runtime/indent/eterm.vim @ 35507:1a7250350167 draft default tip
runtime(doc): In builtin overview use {buf} as param for appendbufline/setbufline (#15089)
Commit: https://github.com/vim/vim/commit/f0837ba0b9dba9d30e3dc2626d4f690a2d51103e
Author: errael <errael@raelity.com>
Date: Mon Jun 24 12:27:01 2024 -0700
runtime(doc): In builtin overview use {buf} as param for appendbufline/setbufline (https://github.com/vim/vim/issues/15089)
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 24 Jun 2024 21:30:08 +0200 |
parents | 9c221ad9634a |
children |
line wrap: on
line source
" Vim indent file " Language: Eterm configuration file " Maintainer: Doug Kearns <dougkearns@gmail.com> " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Last Change: 24 Sep 2021 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetEtermIndent() setlocal indentkeys=!^F,o,O,=end setlocal nosmartindent let b:undo_indent = "setl inde< indk< si<" if exists("*GetEtermIndent") finish endif function GetEtermIndent() let lnum = prevnonblank(v:lnum - 1) if lnum == 0 return 0 endif let ind = indent(lnum) if getline(lnum) =~ '^\s*begin\>' let ind = ind + shiftwidth() endif if getline(v:lnum) =~ '^\s*end\>' let ind = ind - shiftwidth() endif return ind endfunction