LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-12-2006, 02:15 AM   #1
baikonur
Member
 
Registered: Oct 2005
Location: germany
Distribution: debian
Posts: 255
Blog Entries: 5

Rep: Reputation: 30
VIM: ^M at end of line


I got a chunk of PHP code from a cd.
At the end of each line it reads: ^M

Only in (g)vim, though. So it probably is vim-related.

Can somebody give me a hint what it does or point me to the section
of vim's manual that I should read?
 
Old 09-12-2006, 03:02 AM   #2
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 48
It's not vim - ^M is a signal for a carriage-return in some "other" editors
 
Old 09-12-2006, 03:52 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Take a look at this thread for ways to get rid of the ^M.

Hope this helps.
 
Old 09-12-2006, 04:16 AM   #4
baikonur
Member
 
Registered: Oct 2005
Location: germany
Distribution: debian
Posts: 255

Original Poster
Blog Entries: 5

Rep: Reputation: 30
Thanks for your guys' help. I'll try what's been suggested in the thread you posted. I read that the file was probably created using windows... I got the cd out of a magazine with 'Linux' in the title. *laugh*

Weird, I searched for threads with similar names, but without luck.

Thanks again,
Michael

Last edited by baikonur; 09-12-2006 at 04:18 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
no colors in vim on command line rajeev1982 AIX 5 02-05-2015 10:03 AM
C: fread to read a file line by line until the end Blue_muppet Programming 2 09-19-2008 09:42 AM
is it possible to do this in VIM with line wrap on? hedpe Linux - Software 5 04-19-2006 06:19 PM
vim remove LF at the end michal017 Linux - Software 4 11-19-2004 12:26 AM
vim: mark end-of-line? trim blank lines? prell Linux - Software 3 09-20-2004 11:04 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration