Mercurial > vim
diff runtime/indent/rst.vim @ 375:f14cbd913415 v7.0097
updated for version 7.0097
author | vimboss |
---|---|
date | Wed, 29 Jun 2005 22:40:58 +0000 |
parents | 3fc0f57ecb91 |
children | 1f3b1021f002 |
line wrap: on
line diff
--- a/runtime/indent/rst.vim +++ b/runtime/indent/rst.vim @@ -1,28 +1,22 @@ " Vim indent file -" Language: reStructuredText Documentation Format -" Maintainer: Nikolai Weibull <source@pcppopper.org> -" URL: http://www.pcppopper.org/vim/indent/pcp/rst/ -" Latest Revision: 2004-04-25 -" arch-tag: 3fe10f75-24d0-4d94-a924-0ce945958104 +" Language: reStructuredText Documentation Format +" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se> +" Latest Revision: 2005-06-29 -" Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif - let b:did_indent = 1 setlocal indentexpr=GetRSTIndent() -setlocal indentkeys-=:,0# indentkeys-=e +setlocal indentkeys=!^F,o,O -" Only define the function once. if exists("*GetRSTIndent") finish endif function GetRSTIndent() let lnum = prevnonblank(v:lnum - 1) - if lnum == 0 return 0 endif @@ -46,7 +40,7 @@ function GetRSTIndent() let ind = ind - 2 elseif line =~ '^\s*\d\+\.\s' let ind = ind - matchend(substitute(line, '^\s*', '', ''), - \ '\d\+\.\s\+') + \ '\d\+\.\s\+') elseif line =~ '^\s*\.\.' let ind = ind - 3 else @@ -56,5 +50,3 @@ function GetRSTIndent() return ind endfunction - -" vim: set sts=2 sw=2: