vim-indent-detect

A Vim plugin for handeling indentation.
git clone https://git.ce9e.org/vim-indent-detect.git

commit
a5c913b0df19ec08b12dcd29f051ea63abd3934a
parent
ee2e0f04a1aa9569535bcf6f14b738d2cdf3b818
Author
Tobias Bengfort <tobias.bengfort@gmx.net>
Date
2016-09-11 23:16
detect arbitrary space indentation

Diffstat

M plugin/detectindent.vim 7 ++-----

1 files changed, 2 insertions, 5 deletions


diff --git a/plugin/detectindent.vim b/plugin/detectindent.vim

@@ -28,11 +28,8 @@ function! DetectIndent()
   28    28 		if line =~ '^	'
   29    29 			call SetIndent(0)
   30    30 			return
   31    -1 		elseif line =~ '^    '
   32    -1 			call SetIndent(1, 4)
   33    -1 			return
   34    -1 		elseif line =~ '^  '
   35    -1 			call SetIndent(1, 2)
   -1    31 		elseif line =~ '^ '
   -1    32 			call SetIndent(1, strlen(matchstr(line, '^ \+')))
   36    33 			return
   37    34 		endif
   38    35