vim-auto-tabstop

A Vim plugin for automatically setting tabstop size
git clone https://git.ce9e.org/vim-auto-tabstop.git

commit
ef1ee2c5b6de4343e95da68cd96e1a38f40a9882
parent
cfa76a69c28f36a63f386d1066bac3eebc91ccdb
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2023-06-13 19:18
reuse global settings instead of hardcoded values

Diffstat

M plugin/fets.vim 10 +++++-----

1 files changed, 5 insertions, 5 deletions


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

@@ -16,7 +16,7 @@
   16    16 " Usage
   17    17 " -----
   18    18 "
   19    -1 " Press <c-t> to set tabstop width. Press again to reset to 2.
   -1    19 " Press <c-t> to set tabstop width. Press again to reset.
   20    20 "
   21    21 " License
   22    22 " -------
@@ -64,13 +64,13 @@ function! FETS()
   64    64 	let l:fets = s:CalcTS()
   65    65 
   66    66 	if l:fets == &l:tabstop
   67    -1 		let &l:tabstop = 2
   68    -1 		let &l:softtabstop = 2
   69    -1 		let &l:shiftwidth = 2
   -1    67 		let &l:tabstop = &g:tabstop
   -1    68 		let &l:shiftwidth = &g:shiftwidth
   -1    69 		let &l:softtabstop = &g:softtabstop
   70    70 	else
   71    71 		let &l:tabstop = l:fets
   72    -1 		let &l:softtabstop = l:fets
   73    72 		let &l:shiftwidth = l:fets
   -1    73 		let &l:softtabstop = -1
   74    74 	endif
   75    75 endfunction
   76    76