Thursday, March 18, 2010

Change End of Line characters in eclipse

In Eclipse, go to window -> preferences -> workspace

In the bottom right handside of workspace, you will see,
New Text File Line Delimiter,
Click on other, and change it to Unix.

See Image below.



Cheers,
Sonu

Remove Ctrl M characters in vi

To remove windows end of line characters, Ctrl M characters in vi

1) open the file in vi
vi
2) Type the following
To get ^M, press ctrl key on your keyboard and press v and m

:%s/^M//g

3) dont forget to save the file with :wq!

Enjoy.