Something like this?
:%s/\s\+$//

What I want is remove these spaces in this function, even user put
spaces at end of line.

Where are these lines? A single line in a string variable? Multiple
lines in a string variable? List variable? ... ?

At a quick guess, maybe something like this is closer to what you want.

:echo substitute("your text here   ",'\s\+$','','')

Ben.



--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to