Permalink
Browse files

add the number of long lines to the long line flag

  • Loading branch information...
1 parent cc0bdb3 commit a30ace5ad87524a592f209868aecc3d71792f9d3 @scrooloose committed Jun 26, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 vimrc
View
4 vimrc
@@ -115,18 +115,20 @@ function! StatuslineLongLineWarning()
if !exists("b:statusline_long_line_warning")
let longest = -1
+ let number_of_long_lines = 0
let current = 1
while current < line("$")
"substitute tabs for 8 spaces
let len = strlen(substitute(getline(current), '\t', ' ','g'))
if len > longest
let longest = len
+ let number_of_long_lines += 1
endif
let current += 1
endwhile
if longest > 80
- let b:statusline_long_line_warning = "[$:" . longest . "]"
+ let b:statusline_long_line_warning = "[$:" . longest . ",". number_of_long_lines ."]"
else
let b:statusline_long_line_warning = ""
endif

0 comments on commit a30ace5

Please sign in to comment.