Tip #477: How to put the indentation level on the status line
tip karma |
Rating 14/12, Viewed by 2333
|
Read and edit this tip on the
Vim tip wiki.
The wiki may have a more recent version of this tip.
created: |
|
May 20, 2003 14:33 |
|
complexity: |
|
basic |
author: |
|
sputnik |
|
as of Vim: |
|
5.7 |
related to vimtip #303
in .vimrc
set statusline=<Whaterever your status is>\t%{ShowTab()}\ %P
fu ShowTab()
let TabLevel = (indent('.') / &ts; )
if TabLevel == 0
let TabLevel='*'
endif
return TabLevel
endf
<< multime errorformat & makeprgs |
Copy the search results into clipboard >>
Additional Notes
Anonymous,
May 20, 2003 16:50
|
fu ShowTab()
return (indent('.') / &ts; )
endf
|
Anonymous,
May 21, 2003 0:00
|
s/ts/sw/
;-)
|
|