tomtom / quickfixsigns_vim

Mark quickfix & location list items with signs
http://www.vim.org/scripts/script.php?script_id=2584
GNU General Public License v3.0
131 stars 13 forks source link

use quickfixsigns when over column width? #50

Closed cj closed 10 years ago

cj commented 10 years ago

Hi,

I recently wanted a way to tell which lines were over my column width and I found this http://stackoverflow.com/questions/1919028/how-to-show-vertical-line-to-wrap-the-line-in-vim

nnoremap <Leader>H :call<SID>LongLineHLToggle()<cr>
hi OverLength ctermbg=none cterm=none
match OverLength /\%>80v/
fun! s:LongLineHLToggle()
 if !exists('w:longlinehl')
  let w:longlinehl = matchadd('ErrorMsg', '.\%>80v', 0)
  echo "Long lines highlighted"
 else
  call matchdelete(w:longlinehl)
  unl w:longlinehl
  echo "Long lines unhighlighted"
 endif
endfunction

Would it be possible to use it with quickfixsigns to show a * on lines that are over your column width?

p.s. thank you for this amazing plugin!

tomtom commented 10 years ago

Would it be possible to use it with quickfixsigns to show a |*| on lines that are over your column width?

The problem is that it we'd have to update the list quite often (after every change), which would slow things down for big buffers.

Is there a reason why you would prefer signs over highlights?

cj commented 10 years ago

@tomtom thank you for the response. The reason I'd want it over highlights, is it's a lot less intrusive. If you only end up highlighting the part thats over and you don't use wrap (which I don't), you'll never end up seeing it.

If you updated on save it wouldn't slow things down too much would it? Isn't that how updating quickfixsigns for git works?

Thank you again!

cj commented 10 years ago

@tomtom wow, thank you so much for adding this!

Happy Friday, hope you have a great weekend!!