diff options
author | Bram Moolenaar <Bram@vim.org> | 2011-12-30 13:11:27 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2011-12-30 13:11:27 +0100 |
commit | b6b046b281fac168a78b3eafdea9274bef06882f (patch) | |
tree | 8d50c58421278f30521e290a8cf18c6085b78168 /runtime/indent | |
parent | deaf7b739791095e2c98a7087dfe9b3c8dfd56f2 (diff) | |
download | vim-git-b6b046b281fac168a78b3eafdea9274bef06882f.tar.gz |
Updated runtime files.
Diffstat (limited to 'runtime/indent')
-rw-r--r-- | runtime/indent/fortran.vim | 10 | ||||
-rw-r--r-- | runtime/indent/gitolite.vim | 8 | ||||
-rw-r--r-- | runtime/indent/sdl.vim | 10 | ||||
-rw-r--r-- | runtime/indent/tex.vim | 43 |
4 files changed, 43 insertions, 28 deletions
diff --git a/runtime/indent/fortran.vim b/runtime/indent/fortran.vim index a651c09c6..e76c64b67 100644 --- a/runtime/indent/fortran.vim +++ b/runtime/indent/fortran.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: Fortran95 (and Fortran90, Fortran77, F and elf90) -" Version: 0.39 -" Last Change: 2011 May 30 +" Version: 0.40 +" Last Change: 2011 Dec. 28 " Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www.unb.ca/chem/ajit/> " Usage: Do :help fortran-indent from Vim @@ -11,6 +11,9 @@ if exists("b:did_indent") endif let b:did_indent = 1 +let s:cposet=&cpoptions +set cpoptions&vim + setlocal indentkeys+==~end,=~case,=~if,=~else,=~do,=~where,=~elsewhere,=~select setlocal indentkeys+==~endif,=~enddo,=~endwhere,=~endselect,=~elseif setlocal indentkeys+==~type,=~interface,=~forall,=~associate,=~block,=~enum @@ -67,9 +70,6 @@ else endif endif -let s:cposet=&cpoptions -set cpoptions-=C - function FortranGetIndent(lnum) let ind = indent(a:lnum) let prevline=getline(a:lnum) diff --git a/runtime/indent/gitolite.vim b/runtime/indent/gitolite.vim index b95cf0fa2..33b7c9f31 100644 --- a/runtime/indent/gitolite.vim +++ b/runtime/indent/gitolite.vim @@ -2,7 +2,7 @@ " Language: gitolite configuration " URL: https://github.com/tmatilai/gitolite.vim " Maintainer: Teemu Matilainen <teemu.matilainen@iki.fi> -" Last Change: 2011-11-01 +" Last Change: 2011-12-24 if exists("b:did_indent") finish @@ -18,6 +18,9 @@ if exists("*GetGitoliteIndent") finish endif +let s:cpo_save = &cpo +set cpo&vim + function! GetGitoliteIndent() let prevln = prevnonblank(v:lnum-1) let pline = getline(prevln) @@ -37,3 +40,6 @@ function! GetGitoliteIndent() return 0 endif endfunction + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/indent/sdl.vim b/runtime/indent/sdl.vim index 9dde2c3f5..b5e535eea 100644 --- a/runtime/indent/sdl.vim +++ b/runtime/indent/sdl.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: SDL -" Maintainer: Michael Piefel <piefel@informatik.hu-berlin.de> -" Last Change: 2001 Sep 17 +" Maintainer: Michael Piefel <entwurf@piefel.de> +" Last Change: 10 December 2011 " Shamelessly stolen from the Vim-Script indent file @@ -19,7 +19,8 @@ if exists("*GetSDLIndent") " finish endif -set cpo-=C +let s:cpo_save = &cpo +set cpo&vim function! GetSDLIndent() " Find a non-blank line above the current line. @@ -86,4 +87,7 @@ function! GetSDLIndent() return ind endfunction +let &cpo = s:cpo_save +unlet s:cpo_save + " vim:sw=2 diff --git a/runtime/indent/tex.vim b/runtime/indent/tex.vim index 0758a7027..dcfbccdbe 100644 --- a/runtime/indent/tex.vim +++ b/runtime/indent/tex.vim @@ -2,7 +2,7 @@ " Language: LaTeX " Maintainer: Zhou YiChao <broken.zhou@gmail.com> " Created: Sat, 16 Feb 2002 16:50:19 +0100 -" Last Change: Tue, 25 Sep 2011 +" Last Change: 2011 Dec 24 " Last Update: 25th Sep 2002, by LH : " (*) better support for the option " (*) use some regex instead of several '||'. @@ -37,42 +37,42 @@ " " If this variable is unset or non-zero, it will use smartindent-like style " for "{}" and "[]" -" +" " * g:tex_indent_items " " If this variable is set, item-environments are indented like Emacs does " it, i.e., continuation lines are indented with a shiftwidth. -" +" " NOTE: I've already set the variable below; delete the corresponding line " if you don't like this behaviour. " " Per default, it is unset. -" +" " set unset " ---------------------------------------------------------------- -" \begin{itemize} \begin{itemize} +" \begin{itemize} \begin{itemize} " \item blablabla \item blablabla -" bla bla bla bla bla bla +" bla bla bla bla bla bla " \item blablabla \item blablabla -" bla bla bla bla bla bla -" \end{itemize} \end{itemize} +" bla bla bla bla bla bla +" \end{itemize} \end{itemize} " " " * g:tex_items " -" A list of tokens to be considered as commands for the beginning of an item -" command. The tokens should be separated with '\|'. The initial '\' should +" A list of tokens to be considered as commands for the beginning of an item +" command. The tokens should be separated with '\|'. The initial '\' should " be escaped. The default is '\\bibitem\|\\item'. " " * g:tex_itemize_env -" -" A list of environment names, separated with '\|', where the items (item -" commands matching g:tex_items) may appear. The default is +" +" A list of environment names, separated with '\|', where the items (item +" commands matching g:tex_items) may appear. The default is " 'itemize\|description\|enumerate\|thebibliography'. " " * g:tex_noindent_env " -" A list of environment names. separated with '\|', where no indentation is +" A list of environment names. separated with '\|', where no indentation is " required. The default is 'document\|verbatim'. " " * g:tex_indent_and @@ -82,7 +82,7 @@ " Note that this feature need to search back some line, so vim may become " a little slow. " -" }}} +" }}} if exists("b:did_indent") finish @@ -104,7 +104,7 @@ if g:tex_indent_items let g:tex_itemize_env = 'itemize\|description\|enumerate\|thebibliography' endif if !exists('g:tex_items') - let g:tex_items = '\\bibitem\|\\item' + let g:tex_items = '\\bibitem\|\\item' endif else let g:tex_items = '' @@ -125,6 +125,8 @@ let g:tex_items = '^\s*' . g:tex_items if exists("*GetTeXIndent") | finish endif +let s:cpo_save = &cpo +set cpo&vim function GetTeXIndent() " Find a non-blank line above the current line. @@ -137,7 +139,7 @@ function GetTeXIndent() " At the start of the file use zero indent. if lnum == 0 - return 0 + return 0 endif let line = getline(lnum) " last line @@ -159,7 +161,7 @@ function GetTeXIndent() if lnum == 0 - return 0 + return 0 endif let ind = indent(lnum) @@ -171,7 +173,7 @@ function GetTeXIndent() " Add a 'shiftwidth' after beginning of environments. " Don't add it for \begin{document} and \begin{verbatim} - ""if line =~ '^\s*\\begin{\(.*\)}' && line !~ 'verbatim' + ""if line =~ '^\s*\\begin{\(.*\)}' && line !~ 'verbatim' " LH modification : \begin does not always start a line " ZYC modification : \end after \begin won't cause wrong indent anymore if line =~ '\\begin{.*}' && line !~ g:tex_noindent_env @@ -247,4 +249,7 @@ function GetTeXIndent() return ind endfunction +let &cpo = s:cpo_save +unlet s:cpo_save + " vim: set sw=4 textwidth=80: |