News:

Pretty crazy that we're closer to 2030, than we are 2005. Where did the time go!

Main Menu

Gvim

Started by rabbit, May 05, 2006, 07:54:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rabbit

How can I make it accept Windows line endings instead of displaying ^M?

Newby

#1
IIRC you can't.

tr -d '\r' < inputfile.txt > outputfile

That should work. :)

EDIT -- Google FTW! http://vi-improved.org/wiki/index.php/FileFormat
- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

rabbit

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..

Joe

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.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


rabbit

#4
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.

iago

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. 

rabbit

You're right :P  Thanks.