Mercurial > vim
view runtime/indent/treetop.vim @ 10581:dffda1f9b501 v8.0.0180
patch 8.0.0180: error E937 is used twice
commit https://github.com/vim/vim/commit/83381f7129aca00bc2dd24527f160bc6a60d70af
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 14 14:36:08 2017 +0100
patch 8.0.0180: error E937 is used twice
Problem: Error E937 is used both for duplicate key in JSON and for trying
to delete a buffer that is in use.
Solution: Rename the JSON error to E938. (Norio Takagi, closes #1376)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 14 Jan 2017 14:45:04 +0100 |
parents | 6f63330ec225 |
children | 1218c5353e2b |
line wrap: on
line source
" Vim indent file " Language: Treetop " Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2011-03-14 if exists("b:did_indent") finish endif let b:did_indent = 1 setlocal indentexpr=GetTreetopIndent() setlocal indentkeys=0{,0},!^F,o,O,=end setlocal nosmartindent if exists("*GetTreetopIndent") finish endif function GetTreetopIndent() let pnum = prevnonblank(v:lnum - 1) if pnum == 0 return 0 endif let ind = indent(pnum) let line = getline(pnum) if line =~ '^\s*\%(grammar\|module\|rule\)\>' let ind += &sw endif let line = getline(v:lnum) if line =~ '^\s*end\>' let ind -= &sw end retur ind endfunction