linux to windows

Every now and then I bump into some obstacles that made me glad that I spent the first two years of my undergraduate days in the now defunct computational science program, learning programming on linux machines. Add to that some experience with perl during my first job, using vi or regular expressions is not entirely alien to me. The obstacles mainly have to do with collaborating with people who work on linux.

The most recent one being sharing a tex source file, which when ftp-ed from linux to windows, ended up with a ^M character at the end of every line. The stupid tex editor (winshell) on the office pc couldn’t recognize it, treated it as a newline and as a result wouldn’t compile.

Some googling found the following solution in vim

:%s/^M//g

To get the ^M in vim for windows, type Ctrl+q+m. In unix it is, I think, Ctrl+v+m.

This entry was posted in Technology. Bookmark the permalink.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>