aboutsummaryrefslogtreecommitdiff
path: root/vim/autoload/indent.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/autoload/indent.vim')
-rw-r--r--vim/autoload/indent.vim18
1 files changed, 4 insertions, 14 deletions
diff --git a/vim/autoload/indent.vim b/vim/autoload/indent.vim
index 5f62fb0b..19a9f03d 100644
--- a/vim/autoload/indent.vim
+++ b/vim/autoload/indent.vim
@@ -19,27 +19,17 @@ endfunction
" Set the current buffer to tab indent
function! indent#Tabs() abort
- setlocal noexpandtab
- setlocal shiftwidth< softtabstop<
+ setlocal noexpandtab shiftwidth< softtabstop<
call indent#Undo()
endfunction
" Add commands to b:undo_indent to clean up buffer-local indentation changes
" on a change of filetype
function! indent#Undo() abort
-
- " Check and set a flag so that we only do this once per buffer
- if exists('b:undo_indent_type_set')
- return
- endif
- let b:undo_indent_type_set = 1
-
- " Either set or append relevant commands to b:undo_indent
- let l:undo = 'setlocal expandtab< shiftwidth< softtabstop< tabstop<'
+ let undo = 'setlocal expandtab< shiftwidth< softtabstop<'
if exists('b:undo_indent')
- let b:undo_indent .= '|'.l:undo
+ let b:undo_indent .= '|'.undo
else
- let b:undo_indent = l:undo
+ let b:undo_indent = undo
endif
-
endfunction