Mercurial > vim
view runtime/indent/eterm.vim @ 10182:40f6ce4fe30e v7.4.2361
commit https://github.com/vim/vim/commit/ee39ef0b93d31763d05e54ba99801e3f1a254c0d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 10 19:17:42 2016 +0200
patch 7.4.2361
Problem: Checking for last_timer_id to overflow is not reliable. (Ozaki
Kiichi)
Solution: Check for the number not going up.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 10 Sep 2016 19:30:06 +0200 |
parents | beed57a8fcd1 |
children | 1218c5353e2b |
line wrap: on
line source
" Vim indent file " Language: Eterm configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-12-20 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetEtermIndent() setlocal indentkeys=!^F,o,O,=end setlocal nosmartindent 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 + &sw endif if getline(v:lnum) =~ '^\s*end\>' let ind = ind - &sw endif return ind endfunction