regex in vim to clear the trailing character
December 6th, 2006 mysurface
Sometimes, the file created at windows may tag alone the trailing character at the end of every line, where user press enter. It may shows as ^M. It is very irritating! to clear it off is very easy in vim. :%s/\s*\r*$// %s is global search, change effect on every lines, \s is space \s* is [...]
Posted in Text Manipulation, vi, vim | Hits: 21656 | 1 Comment »






