Archive for the 'vim' Category

Jan 29 2008

vim tip of the day

Published by Brian under vim

Vim is a great editor. I don’t want to start an EMACS versus vim flame war here. It is just personal preference: I “get” vim, whereas EMACS confuses me.

Anyway, here’s a clever little tip for users of vim that often have to open both DOS and UNIX format files (you know, the old ^M line feed problem):

While in the editor you can write out either format.

:set ff=unix
:w

Sets the file to UNIX linefeeds, while

:set ff=dos
:w

Sets them to DOS. Enjoy!

2 responses so far