- commit
- 0e786d6f9456103428c113f777ecd25b80fd98ad
- parent
- ef1ee2c5b6de4343e95da68cd96e1a38f40a9882
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2023-06-13 19:23
simplify
Diffstat
| M | plugin/fets.vim | 24 | ++---------------------- |
1 files changed, 2 insertions, 22 deletions
diff --git a/plugin/fets.vim b/plugin/fets.vim
@@ -26,33 +26,13 @@ 26 26 " 27 27 " [1]: http://nickgravgaard.com/elastic-tabstops/ 28 2829 -1 function! s:MaxTabCount()30 -1 let l:max = 031 -132 -1 for l:line in getline(0, "$")33 -1 let l:tab_count = len(split(l:line, '\t')) - 134 -1 if l:tab_count > l:max35 -1 let l:max = l:tab_count36 -1 endif37 -1 endfor38 -139 -1 return l:max40 -1 endfunction41 -142 29 function! s:CalcTS() 43 30 let l:max = 044 -1 let l:tab_count = s:MaxTabCount()45 31 46 32 for l:line in getline(0, "$")47 -1 let l:i = 048 -149 33 for l:item in split(l:line, '\t')[:-2]50 -1 if l:i < l:tab_count51 -1 if len(l:item) > l:max52 -1 let l:max = len(l:item)53 -1 endif54 -155 -1 let l:i += 1-1 34 if len(l:item) > l:max -1 35 let l:max = len(l:item) 56 36 endif 57 37 endfor 58 38 endfor