aboutsummaryrefslogtreecommitdiff
path: root/vim/indent
diff options
context:
space:
mode:
Diffstat (limited to 'vim/indent')
-rw-r--r--vim/indent/csv.vim10
-rw-r--r--vim/indent/tsv.vim10
-rw-r--r--vim/indent/vim.vim9
3 files changed, 14 insertions, 15 deletions
diff --git a/vim/indent/csv.vim b/vim/indent/csv.vim
index ae2b6f6c..d092838f 100644
--- a/vim/indent/csv.vim
+++ b/vim/indent/csv.vim
@@ -1,7 +1,11 @@
+" Only do this when not done yet for this buffer
+if exists('b:did_indent')
+ finish
+endif
+let b:did_indent = 1
+
" Manual indenting and literal tabs for CSVs
setlocal noautoindent
setlocal noexpandtab
-
-" Unload this indent plugin
-let b:undo_user_indent
+let b:undo_indent
\ = 'setlocal autoindent< expandtab<'
diff --git a/vim/indent/tsv.vim b/vim/indent/tsv.vim
index 759602ed..56721a4c 100644
--- a/vim/indent/tsv.vim
+++ b/vim/indent/tsv.vim
@@ -1,7 +1,11 @@
+" Only do this when not done yet for this buffer
+if exists('b:did_indent')
+ finish
+endif
+let b:did_indent = 1
+
" Manual indenting and literal tabs for TSVs
setlocal noautoindent
setlocal noexpandtab
-
-" Unload this indent plugin
-let b:undo_user_indent
+let b:undo_indent
\ = 'setlocal autoindent< expandtab<'
diff --git a/vim/indent/vim.vim b/vim/indent/vim.vim
deleted file mode 100644
index 138b9205..00000000
--- a/vim/indent/vim.vim
+++ /dev/null
@@ -1,9 +0,0 @@
-" Observe VimL conventions for two-space indents
-setlocal shiftwidth=2
-setlocal softtabstop=2
-setlocal tabstop=2
-
-" Unload this indent plugin; suppress errors because ancient Vim can't use the
-" '<' suffix syntax for resetting local integer
-let b:undo_user_indent
- \ = 'silent! setlocal shiftwidth< softtabstop< tabstop<'