Put the indentation level on the status line
From Vim Tips Wiki
(Redirected from VimTip477)
Tip 477 • Previous Tip • Next Tip
Created: May 20, 2003 Complexity: basic Author: sputnik Minimum version: 5.7 Karma: 14/12 Imported from: Tip#477
Related to VimTip303
In vimrc:
set statusline=<Whatever your status is>\t%{ShowTab()}\ %P
fu ShowTab()
let TabLevel = (indent('.') / &ts )
if TabLevel == 0
let TabLevel='*'
endif
return TabLevel
endf
[edit] Comments
fu ShowTab()
return (indent('.') / &ts )
endf
s/ts/sw/
Categories: Review | VimTip | Indenting | Options
