On Jul 20, 2011, at 2:50 PM, [email protected] wrote:

> ACK
> 
> please look for trailing whitespace before commit (I had to disable my 
> pre-commit hook before it would allow me to apply)
> 
> You very likely already have your own solution but FWIW, here's what I have 
> in .vimrc for getting rid of whitespace:
> 
> function Nukespace()
>  let flags = 'w'
>  if search('\s\+$', flags) > 0
>   %s/\s\+$//gc
>  else
>    echo("CLEAN - NO WHITESPACE FOUND")
>  endif
> :endfunction
> 
> map <silent> <F12> :call Nukespace()<CR>
> autocmd BufWritePre * windo  call Nukespace()
> 
> It calls 'Nukespace' either when I press F12, or every time I write a file. 
> The function asks for confirm before removing (/gc),

Thanks!. I've already something to mark all whitespaces:

highlight RedundantSpaces ctermbg=red guibg=red
match RedundantSpaces /\s\+$\| \+\ze\t\|\t/
nmap <leader>wht :match RedundantSpaces /\s\+$\| \+\ze\t\|\t/<cr>

Unfortunately it doesn't work all the time. I'll improve it with your function 
:).

  -- Michal


> 
> marios
> 
> 
> On 19/07/11 14:58, [email protected] wrote:
>> Hi,
>> 
>> This patch will inject 'Date' header in order to match with RFC 2616
>> specification. This header is used for client in order to let them know
>> where they should 'revalidate' cache.
>> 
>>   -- Michal
>> 
> 

Reply via email to