Get rid of those stupid ^M’s from your code.
Posted 1 year, 5 months ago at 4:21 pm. 5 comments
Yes i’m geek and i’m using VI. I found tons of ^M’s in wordpress files while i was coding this blog.
Here’s how to get rid of them:
Open your file in vi
# vi file.phpthen press “:” and type this:
:%s/[ctrl+v][ctrl+m]//g
[ctrl+v] … hold control and press v
[ctrl+m] … hold control and press m
Voila, there’s no more ^M’s and your code is clean in the way it should be!
Thanks dali ;-) and nice blog !
U’re welcome! ;-) And thank you :-P
Dalibor has a noo blog!
R u saying that you use vi for coding just because it sounds geeky or are you truly a uber terminal junkie?
@tomaz: It’s all about speed and usability! :-) Just think about editor in which you don’t need mouse at all ;-)
@dalibor - nah … I prefer nano for the terminal and Kate for non IDE coding