Vim Tips Wiki
Advertisement
Tip 477 Printable Monobook Previous Next

created May 20, 2003 · complexity basic · author sputnik · version 5.7


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

Comments[]

fu ShowTab()
  return (indent('.') / &ts )
endf

s/ts/sw/

Advertisement