How can I make it accept Windows line endings instead of displaying ^M?
IIRC you can't.
tr -d '\r' < inputfile.txt > outputfile
That should work. :)
EDIT -- Google FTW! http://vi-improved.org/wiki/index.php/FileFormat
Any way to do it automatically? I'm working on a website and I want to be able to edit it here and at school (Windows) without converting back-and-forth all the time..
You could create a shellscript to translate to UNIX, edit, and then translate to Windows.
Or you could use gedit, but that's another story.
I don't use Gnome -.-;; but I'll give it a shot.
[edit]
Gedit update:
despite installing gnome-doc-utils, I get the following:
checking for GDU_MODULE_VERSION_CHECK... Package gnome-doc-utils was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnome-doc-utils.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gnome-doc-utils' found
configure: error: Package requirements (gnome-doc-utils >= 0.3.2) were not met.
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively you may set the GDU_MODULE_VERSION_CHECK_CFLAGS and GDU_MODULE_VERSION_CHECK_LIBS environment variables
to avoid the need to call pkg-config. See the pkg-config man page for
more details.
For some reason, after creating ~/.vimrc with the following commands:
:syn on
:set tabstop=4
It stopped complaining about Windows' endlines.
I think I may have written a shellscript at some point to fix it, and posted it here or at vL. But that was a long time ago. It shouldn't be very hard to do.
You're right :P Thanks.