Mercurial > vim
view runtime/indent/treetop.vim @ 12307:50b0b3aaa545 v8.0.1033
patch 8.0.1033: detecting background color does not work in screen
commit https://github.com/vim/vim/commit/995e4afcfe60aa3c214ba680e7b027a4e05cf62b
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Sep 1 20:24:03 2017 +0200
patch 8.0.1033: detecting background color does not work in screen
Problem: Detecting background color does not work in screen, even when it
is working like an xterm.
Solution: Make "screen.xterm" use termcap entries like an xterm. (Lubomir
Rintel, closes #2048) When termresponse version is huge also
recognize as not being an xterm.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 01 Sep 2017 20:30:04 +0200 |
parents | d0a20101ecb2 |
children | 11b656e74444 |
line wrap: on
line source
" Vim indent file " Language: Treetop " Previous 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 += shiftwidth() endif let line = getline(v:lnum) if line =~ '^\s*end\>' let ind -= shiftwidth() end retur ind endfunction