Author Topic: Gvim  (Read 3196 times)

0 Members and 1 Guest are viewing this topic.

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Gvim
« on: May 05, 2006, 07:54:36 pm »
How can I make it accept Windows line endings instead of displaying ^M?

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: Gvim
« Reply #1 on: May 05, 2006, 08:22:14 pm »
IIRC you can't.

Code: [Select]
tr -d '\r' < inputfile.txt > outputfile
That should work. :)

EDIT -- Google FTW! http://vi-improved.org/wiki/index.php/FileFormat
« Last Edit: May 05, 2006, 08:25:02 pm by Newby »
- 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

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. 

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Gvim
« Reply #2 on: May 05, 2006, 09:38:00 pm »
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..

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Gvim
« Reply #3 on: May 06, 2006, 12:19:52 am »
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'd personally do as Joe suggests

You might be right about that, Joe.


Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Gvim
« Reply #4 on: May 06, 2006, 07:41:48 am »
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.
« Last Edit: May 06, 2006, 07:57:25 am by rabbit »

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Gvim
« Reply #5 on: May 06, 2006, 09:29:38 am »
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. 

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Gvim
« Reply #6 on: May 06, 2006, 01:56:12 pm »
You're right :P  Thanks.