History Report a problem
Article Edit this page Discussion

Put the indentation level on the status line

From Vim Tips Wiki

(Redirected from VimTip477)
Jump to: navigation, search
 

Tip 477Previous TipNext 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/

Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto
Terminator Wiki
Legend of Zelda Wiki
Flash Gordon
Everquest II Wiki
Yo-Yo Wiki
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions
Send this article to a friend
"Put the indentation level on the status line"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation