Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8991063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:38:17+00:00 2026-06-15T22:38:17+00:00

When I save lines of data in excel files as tab delimited .txt files,

  • 0

When I save lines of data in excel files as tab delimited .txt files, and then open those files in VIM, I see that what was once a multi-line file in excel is now a single line file in VIM.

The “lines” can be separated in VIM using some substitution commands:

%s/^M/\r\n/g

After this, the “lines” are now separated by an ^@.
I deal with it using another substitution command:

%s/^@//g

My questions are:

  1. Why do my multi-line txt excel files open as a single line in VI?
  2. What is ^@?
  3. Is there a better way to ‘fix’ my txt files?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:38:19+00:00Added an answer on June 15, 2026 at 10:38 pm

    Try this command:

        :%s/^M/\r/g
    

    \r is the carriage return character vim uses. The ^M character is a newline character that is literally displayed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a program which reads data from 2 text files and then save
I'm working with CSV transaction data files that are 350 mb+ and 1,100,000+ lines
Goal of the script is to take the data from an excel file that
My application needs to pass data back and forth via text files with Excel.
I would like to add SAVE/OPEN functionality to a little Excel program I wrote.
I have a desktop application using vb.net, to process some excel files, those files
I have data that I want to have written into a Microsoft Excel File.
I am using the following lines of code to download and save an html
I am using the following line of code to save my file of yoyo.txt
I save picture from UIImagePicker this way: Save picture in file and then I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.