Wikia

Vim Tips Wiki

Put the indentation level on the status line

Talk0
1,610pages on
this wiki
Revision as of 11:30, May 31, 2008 by JohnBot (Talk | contribs)

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 | Your ad here

Around Wikia's network

Random Wiki