Skip to content

Removing trailing whitespaces and ^M chars does not work for JAVASCRIPT file. #61

Closed
lihuazhang opened this Issue Mar 10, 2012 · 2 comments

2 participants

@lihuazhang

Hi
The line:
autocmd FileType c,cpp,java,php,js,python,ruby autocmd BufWritePre :call setline(1,map(getline(1,"$"),'substitute(v:val,"\s\+$","","")'))

does not work for JAVASCRIPT file.

But when I change js to javascript:
autocmd FileType c,cpp,java,php,javascript,python,ruby autocmd BufWritePre :call setline(1,map(getline(1,"$"),'substitute(v:val,"\s\+$","","")'))

It works.

I use mac 10.7.3 vim 7.3

@spf13
Owner
spf13 commented Mar 13, 2012

Can you fork and submit a pull request please?

@spf13
Owner
spf13 commented Mar 13, 2012

Closed with pull request 62

@spf13 spf13 closed this Mar 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.