Re: Hot tip for vim users: highlight spaces at end of lines

2016-01-03 Thread Stephan Bergmann
On 12/31/2015 02:38 AM, Chris Sherlock wrote: highlight ExtraWhitespace ctermbg=red guibg=red match ExtraWhitespace /\s\+$/ ...and if you are in the other camp, you add (setq-default show-trailing-whitespace t) to your .emacs ___ LibreOffice maili

Re: Hot tip for vim users: highlight spaces at end of lines

2016-01-01 Thread Daniel Robertson
> You could also run that :substitute on :w and never have to worry about > trailing whitespace ever again :) > > autocmd BufWritePre * :%s/\s\+$//e Great tip! Just remember if you place a `autocmd` in your vimrc to place it in a `augroup` and run `autocmd!`. Otherwise vim will create multiple `a

Re: Hot tip for vim users: highlight spaces at end of lines

2016-01-01 Thread Daniel Robertson
In light of Norbert's comment maybe add *.cxx *.hxx augroup trailing_whitespace autocmd! autocmd BufWritePre *.cxx :%s/\s\+$//e autocmd BufWritePre *.hxx :%s/\s\+$//e augroup END signature.asc Description: Digital signature ___ LibreOffice

Re: Hot tip for vim users: highlight spaces at end of lines

2016-01-01 Thread Chris Sherlock
Probably best to use: augroup trailing_whitespace autocmd! autocmd BufWritePre *.c :%s/\s\+$//e autocmd BufWritePre *.h :%s/\s\+$//e autocmd BufWritePre *.cxx :%s/\s\+$//e autocmd BufWritePre *.hxx :%s/\s\+$//e augroup END > On 1 Jan 2016, at 4:53 AM, Daniel Robertson wrote: > >

Re: Hot tip for vim users: highlight spaces at end of lines

2015-12-31 Thread Norbert Thiebaud
On Thu, Dec 31, 2015 at 9:20 AM, Chris Sherlock wrote: > Oh! Nice :-) I'll be doing that - I'm a serial offender, but I only ever > annoy myself! Then make sure never to edit solenv/gbuild/gbuild.mk In there, there is a purposeful trailing white space. (line 55) Norbert

Re: Hot tip for vim users: highlight spaces at end of lines

2015-12-31 Thread Chris Sherlock
Oh! Nice :-) I'll be doing that - I'm a serial offender, but I only ever annoy myself! Chris On Friday, January 1, 2016, Ashod Nakashian wrote: > On Wed, Dec 30, 2015 at 8:38 PM, Chris Sherlock < > chris.sherloc...@gmail.com > > wrote: > >> Hi all, >> >> Quick tip I’d like to share - every now

Re: Hot tip for vim users: highlight spaces at end of lines

2015-12-31 Thread Ashod Nakashian
On Wed, Dec 30, 2015 at 8:38 PM, Chris Sherlock wrote: > Hi all, > > Quick tip I’d like to share - every now and then I accidentally add a > space on the end of lines of code. > > You can highlight this occurring in vim by adding the following to your > .vimrc file: > > highlight ExtraWhitespace

Hot tip for vim users: highlight spaces at end of lines

2015-12-30 Thread Chris Sherlock
Hi all, Quick tip I’d like to share - every now and then I accidentally add a space on the end of lines of code. You can highlight this occurring in vim by adding the following to your .vimrc file: highlight ExtraWhitespace ctermbg=red guibg=red match ExtraWhitespace /\s\+$/ Probably most v