aboutsummaryrefslogtreecommitdiff
path: root/vim/after/indent
diff options
context:
space:
mode:
Diffstat (limited to 'vim/after/indent')
-rw-r--r--vim/after/indent/awk.vim8
-rw-r--r--vim/after/indent/css.vim8
-rw-r--r--vim/after/indent/html.vim12
-rw-r--r--vim/after/indent/javascript.vim8
-rw-r--r--vim/after/indent/mail.vim8
-rw-r--r--vim/after/indent/perl.vim8
-rw-r--r--vim/after/indent/php.vim8
-rw-r--r--vim/after/indent/sh.vim8
-rw-r--r--vim/after/indent/vim.vim12
9 files changed, 13 insertions, 67 deletions
diff --git a/vim/after/indent/awk.vim b/vim/after/indent/awk.vim
index ba6dfdeb..951c830a 100644
--- a/vim/after/indent/awk.vim
+++ b/vim/after/indent/awk.vim
@@ -1,8 +1,2 @@
" Use four spaces for indentation
-setlocal expandtab
-setlocal shiftwidth=4
-let b:undo_ftplugin .= '|setlocal expandtab< shiftwidth<'
-if &l:softtabstop != -1
- let &l:softtabstop = &l:shiftwidth
- let b:undo_ftplugin .= '|setlocal softtabstop<'
-endif
+runtime macros/indent/spaces/4.vim
diff --git a/vim/after/indent/css.vim b/vim/after/indent/css.vim
index ba6dfdeb..951c830a 100644
--- a/vim/after/indent/css.vim
+++ b/vim/after/indent/css.vim
@@ -1,8 +1,2 @@
" Use four spaces for indentation
-setlocal expandtab
-setlocal shiftwidth=4
-let b:undo_ftplugin .= '|setlocal expandtab< shiftwidth<'
-if &l:softtabstop != -1
- let &l:softtabstop = &l:shiftwidth
- let b:undo_ftplugin .= '|setlocal softtabstop<'
-endif
+runtime macros/indent/spaces/4.vim
diff --git a/vim/after/indent/html.vim b/vim/after/indent/html.vim
index 72c92d21..fb7f4127 100644
--- a/vim/after/indent/html.vim
+++ b/vim/after/indent/html.vim
@@ -1,15 +1,9 @@
+" Use four spaces for indentation
+runtime macros/indent/spaces/4.vim
+
" Clear away the flag we set to indent after paragraphs
unlet html_indent_inctags
" Don't re-indent lines on right-angle-bracket or enter
setlocal indentkeys-=<>>,<Return>
let b:undo_ftplugin .= '|setlocal indentkeys<'
-
-" Use four spaces for indentation
-setlocal expandtab
-setlocal shiftwidth=4
-let b:undo_ftplugin .= '|setlocal expandtab< shiftwidth<'
-if &l:softtabstop != -1
- let &l:softtabstop = &l:shiftwidth
- let b:undo_ftplugin .= '|setlocal softtabstop<'
-endif
diff --git a/vim/after/indent/javascript.vim b/vim/after/indent/javascript.vim
index ba6dfdeb..951c830a 100644
--- a/vim/after/indent/javascript.vim
+++ b/vim/after/indent/javascript.vim
@@ -1,8 +1,2 @@
" Use four spaces for indentation
-setlocal expandtab
-setlocal shiftwidth=4
-let b:undo_ftplugin .= '|setlocal expandtab< shiftwidth<'
-if &l:softtabstop != -1
- let &l:softtabstop = &l:shiftwidth
- let b:undo_ftplugin .= '|setlocal softtabstop<'
-endif
+runtime macros/indent/spaces/4.vim
diff --git a/vim/after/indent/mail.vim b/vim/after/indent/mail.vim
index ba6dfdeb..951c830a 100644
--- a/vim/after/indent/mail.vim
+++ b/vim/after/indent/mail.vim
@@ -1,8 +1,2 @@
" Use four spaces for indentation
-setlocal expandtab
-setlocal shiftwidth=4
-let b:undo_ftplugin .= '|setlocal expandtab< shiftwidth<'
-if &l:softtabstop != -1
- let &l:softtabstop = &l:shiftwidth
- let b:undo_ftplugin .= '|setlocal softtabstop<'
-endif
+runtime macros/indent/spaces/4.vim
diff --git a/vim/after/indent/perl.vim b/vim/after/indent/perl.vim
index ba6dfdeb..951c830a 100644
--- a/vim/after/indent/perl.vim
+++ b/vim/after/indent/perl.vim
@@ -1,8 +1,2 @@
" Use four spaces for indentation
-setlocal expandtab
-setlocal shiftwidth=4
-let b:undo_ftplugin .= '|setlocal expandtab< shiftwidth<'
-if &l:softtabstop != -1
- let &l:softtabstop = &l:shiftwidth
- let b:undo_ftplugin .= '|setlocal softtabstop<'
-endif
+runtime macros/indent/spaces/4.vim
diff --git a/vim/after/indent/php.vim b/vim/after/indent/php.vim
index ba6dfdeb..951c830a 100644
--- a/vim/after/indent/php.vim
+++ b/vim/after/indent/php.vim
@@ -1,8 +1,2 @@
" Use four spaces for indentation
-setlocal expandtab
-setlocal shiftwidth=4
-let b:undo_ftplugin .= '|setlocal expandtab< shiftwidth<'
-if &l:softtabstop != -1
- let &l:softtabstop = &l:shiftwidth
- let b:undo_ftplugin .= '|setlocal softtabstop<'
-endif
+runtime macros/indent/spaces/4.vim
diff --git a/vim/after/indent/sh.vim b/vim/after/indent/sh.vim
index ba6dfdeb..951c830a 100644
--- a/vim/after/indent/sh.vim
+++ b/vim/after/indent/sh.vim
@@ -1,8 +1,2 @@
" Use four spaces for indentation
-setlocal expandtab
-setlocal shiftwidth=4
-let b:undo_ftplugin .= '|setlocal expandtab< shiftwidth<'
-if &l:softtabstop != -1
- let &l:softtabstop = &l:shiftwidth
- let b:undo_ftplugin .= '|setlocal softtabstop<'
-endif
+runtime macros/indent/spaces/4.vim
diff --git a/vim/after/indent/vim.vim b/vim/after/indent/vim.vim
index 320e5d7d..59179225 100644
--- a/vim/after/indent/vim.vim
+++ b/vim/after/indent/vim.vim
@@ -1,15 +1,9 @@
+" Use two (not four!) spaces for indentation, per convention
+runtime macros/indent/spaces/2.vim
+
" Remove inapplicable defaults from 'indentkeys'; we should only need to undo
" this if the stock plugin didn't already arrange that (before v7.3.539)
setlocal indentkeys-=0#,0{,0},0),:
if !exists('b:undo_indent')
let b:undo_indent = 'setlocal indentkeys<'
endif
-
-" Observe VimL conventions for two-space indents
-setlocal expandtab
-setlocal shiftwidth=2
-let b:undo_indent .= '|setlocal expandtab< shiftwidth<'
-if &softtabstop != -1
- let &l:softtabstop = &l:shiftwidth
- let b:undo_indent .= '|setlocal softtabstop<'
-endif