LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 10-29-2006, 01:58 PM   #1
dlublink
Member
 
Registered: Oct 2004
Location: Canada
Distribution: Ubuntu
Posts: 329

Rep: Reputation: 30
^M in VIM


Hello,

I am using VIM to edit some files that contain ^M. I don't want to run a search and replace every day.

Can VIM be setup to hide those ^M characters and work on the file and add ^M characters when necessary?

Thanks,

David
 
Old 10-29-2006, 05:20 PM   #2
rednuht
Member
 
Registered: Aug 2005
Posts: 239
Blog Entries: 1

Rep: Reputation: 30
I do not know how to do it inside vim but this article explains how to do it before running vim
http://www.cyberciti.biz/faq/howto-u...x-text-format/
 
Old 10-29-2006, 05:48 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,897

Rep: Reputation: 746Reputation: 746Reputation: 746Reputation: 746Reputation: 746Reputation: 746Reputation: 746
The command to convert a DOS file to unix within vi:
set ff=unix
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
encryption with Vim (vim -x) mikshaw Linux - Software 2 03-07-2007 09:00 AM
LXer: Vim tips: Using Vim mappings and abbreviations LXer Syndicated Linux News 0 06-18-2006 01:54 PM
LXer: Cream for Vim - Making Vim more user friendly LXer Syndicated Linux News 0 06-17-2006 11:54 PM
^M and vim jrdioko Linux - Software 5 08-04-2004 11:36 PM
VIM help bender_pondie Linux - Software 3 08-01-2003 10:58 AM


All times are GMT -5. The time now is 07:31 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration