summaryrefslogtreecommitdiff
path: root/runtime/indent
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/indent')
-rw-r--r--runtime/indent/bib.vim15
-rw-r--r--runtime/indent/c.vim4
-rw-r--r--runtime/indent/cs.vim2
-rw-r--r--runtime/indent/lisp.vim15
-rw-r--r--runtime/indent/rpl.vim5
-rw-r--r--runtime/indent/vb.vim3
6 files changed, 42 insertions, 2 deletions
diff --git a/runtime/indent/bib.vim b/runtime/indent/bib.vim
new file mode 100644
index 000000000..d1a0636ec
--- /dev/null
+++ b/runtime/indent/bib.vim
@@ -0,0 +1,15 @@
+" Vim indent file
+" Language: BibTeX
+" Maintainer: Dorai Sitaram <ds26@gte.com>
+" URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html
+" Last Change: 2005 Mar 28
+
+" Only do this when not done yet for this buffer
+if exists("b:did_indent")
+ finish
+endif
+let b:did_indent = 1
+
+setlocal cindent
+
+let b:undo_indent = "setl cin<"
diff --git a/runtime/indent/c.vim b/runtime/indent/c.vim
index 135251dca..e224382f6 100644
--- a/runtime/indent/c.vim
+++ b/runtime/indent/c.vim
@@ -1,7 +1,7 @@
" Vim indent file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2001 Jun 12
+" Last Change: 2005 Mar 27
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -11,3 +11,5 @@ let b:did_indent = 1
" C indenting is built-in, thus this is very simple
setlocal cindent
+
+let b:undo_indent = "setl cin<"
diff --git a/runtime/indent/cs.vim b/runtime/indent/cs.vim
index 064ab0069..4a040b6fe 100644
--- a/runtime/indent/cs.vim
+++ b/runtime/indent/cs.vim
@@ -11,3 +11,5 @@ let b:did_indent = 1
" C# is like indenting C
setlocal cindent
+
+let b:undo_indent = "setl cin<"
diff --git a/runtime/indent/lisp.vim b/runtime/indent/lisp.vim
new file mode 100644
index 000000000..444fe103b
--- /dev/null
+++ b/runtime/indent/lisp.vim
@@ -0,0 +1,15 @@
+" Vim indent file
+" Language: Lisp
+" Maintainer: noone
+" Last Change: 2005 Mar 28
+
+" Only load this indent file when no other was loaded.
+if exists("b:did_indent")
+ finish
+endif
+let b:did_indent = 1
+
+" Autoindent is the best we can do.
+setlocal ai
+
+let b:undo_indent = "setl ai<"
diff --git a/runtime/indent/rpl.vim b/runtime/indent/rpl.vim
index 341f5f950..07bfd0659 100644
--- a/runtime/indent/rpl.vim
+++ b/runtime/indent/rpl.vim
@@ -1,7 +1,7 @@
" Vim indent file
" Language: RPL/2
" Version: 0.2
-" Last Change: 2002 August 16
+" Last Change: 2005 Mar 28
" Maintainer: BERTRAND Joël <rpl2@free.fr>
" Only load this indent file when no other was loaded.
@@ -10,6 +10,7 @@ if exists("b:did_indent")
endif
let b:did_indent = 1
+setlocal autoindent
setlocal indentkeys+==~end,=~case,=~if,=~then,=~else,=~do,=~until,=~while,=~repeat,=~select,=~default,=~for,=~start,=~next,=~step,<<>,<>>
" Define the appropriate indent function but only once
@@ -18,6 +19,8 @@ if exists("*RplGetFreeIndent")
finish
endif
+let b:undo_indent = "set ai< indentkeys< indentexpr<"
+
function RplGetIndent(lnum)
let ind = indent(a:lnum)
let prevline=getline(a:lnum)
diff --git a/runtime/indent/vb.vim b/runtime/indent/vb.vim
index b570b56b8..85021bd7d 100644
--- a/runtime/indent/vb.vim
+++ b/runtime/indent/vb.vim
@@ -8,10 +8,13 @@ if exists("b:did_indent")
endif
let b:did_indent = 1
+setlocal autoindent
setlocal indentexpr=VbGetIndent(v:lnum)
setlocal indentkeys&
setlocal indentkeys+==~else,=~elseif,=~end,=~wend,=~case,=~next,=~select,=~loop,<:>
+let b:undo_indent = "set ai< indentexpr< indentkeys<"
+
" Only define the function once.
if exists("*VbGetIndent")
finish