Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I copied a vimrc file from a windows box running gvim and tried using it on an OSX box. Turns out there are a bunch of characters that my unix vim doesn't like in the file. I assume they're Windows EOL characters or something - doesn't really matter. Anyway, Is there an easy way to remove them all at once, or convert the file to a unix friendly format?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Ah, figured it out. To convert to a nice unix format, just use :set ff=unix then :w. See this S/O answer...

share|improve this answer
    
Or remove them with :%s/<C-v><Enter>//. Vim on Windows supports Unix EOL but Vim on Unix doesn't like Windows EOL. It's best to always use Unix EOL. –  romainl Mar 3 '13 at 8:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.