3 ms·
someone mentioned listchars elsewhere, but I prefer these glyphs: set listchars=tab:»·,trail:· set list this makes it so all your tabs and trailing wh
by throw_away 17y ago
someone mentioned listchars elsewhere, but I prefer these glyphs:
set listchars=tab:»·,trail:·
set list
this makes it so all your tabs and trailing whitespace is visible. note, this will make you hate almost every other developer.
- lux 17y agoIndeed! I can't do it any more, just filled me with so much hate... It's like people use the spacebar just to think. /rant ;)
- lux 17y agoAnd to answer the poster, I tend to just use the default vim. I'm bouncing around machines so much that I don't bother setting anything up on my main one that I'll miss on the others...
- lucasoman 17y agoMy cure for that is putting my .vimrc on my site; then, from a foreign machine, I just do: wget -O ~/.vimrc http://lucasoman.com/vimrc http://lucasoman.com/vimrc And just like that, I'm in my comfort zone. Of course, this doesn't cover plugins and such, but I don't use those very often.
- meese_ 17y agoHere's a function I wrote to get rid of trailing white space: fun! s:RemoveWhitespace() if &bin | return | endif if search('\s\+$', 'n') let line = line('.') let col = col('.') sil %s/\s\+$//ge call cursor(line, col) echo 'Removed trailing whitespace.' else echo 'No trailing whitespace found.' endif endf You can map it with: nn <silent> ,R :cal<SID>RemoveWhitespace()<cr>
- pyre 17y agoGoing into an old codebase and just running ':set list' with just the default listchars is maddening enough. The mixes of tabs and whitespace characters is enough to drive one batty. Especially when you find files where someone was using tabs, but with the 'ts=8' or 'ts=2' rather than 'ts=4'.