diff options
Diffstat (limited to 'runtime/indent/rst.vim')
-rw-r--r-- | runtime/indent/rst.vim | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/runtime/indent/rst.vim b/runtime/indent/rst.vim index c6269ec6a..f98e7556d 100644 --- 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: |