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

  • SEARCH
  • Home
  • 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 6683571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:50:13+00:00 2026-05-26T04:50:13+00:00

So I have several large datasets that I need to make more readable and

  • 0

So I have several large datasets that I need to make more readable and currently I’m having to go in and move to each 3rd value and insert a newline. I’ve tried several things in VIM to get this to work, but none seem to return the value that I’m looking for. Here’s some of my data:

(0.96260310749184663, 4.3830008206495812, 0.84922658632317849),
(0.96260310749184663, 5.0000002088986637, 1.049701855818201),
(0.96260310749184697, 5.6169993576359696, 0.8492264385213405),
(0.96260310749184719, 5.9983257940402384, 0.32437568665165911),
(0.96260310749184719, 5.9983258053918069, -0.32437572732698844),
(0.96260310749184719, 5.6169994358349786, -0.84922691097323821),
(0.96260310749184697, 5.0000000093711492, -1.0497019267383632)

What I need to do is make it look like this instead:

(0.96260310749184663, 4.3830008206495812, 
 0.84922658632317849),
(0.96260310749184663, 5.0000002088986637, 
 1.049701855818201),
(0.96260310749184697, 5.6169993576359696, 
 0.8492264385213405),
(0.96260310749184719, 5.9983257940402384, 
 0.32437568665165911),
(0.96260310749184719, 5.9983258053918069, 
 -0.32437572732698844),
(0.96260310749184719, 5.6169994358349786, 
 -0.84922691097323821),
(0.96260310749184697, 5.0000000093711492, 
 -1.0497019267383632)

I used this on a selection to try and get it to move that 3rd value down, but it duplicated the entire thing and then moved the entire line down:

:'<,'>s/\([-[0-9.]\+,\s[-[0-9.]\+,\)/\1\r&/g

I also tried removing the 1 to make it work, but that didn’t work either. So is there any way I can capture that 3rd value and insert a carriage return or newline to make this work? Thanks.

Edit—

I apologize for mis-communicating part of my problem: The data at the top is all on one line, not several lines. It looks like this:

(0.31852533878680489, 0.10352149350126813, -0.0046069731261429991), (0.31852526554320226, -0.103521543762028, -0.0046069731261429991), (0.19682845687859715, -0.27102285045297636, -0.004606973126142444), (-8.1184530326649769e-05, -0.33500267513407755, -0.0046069731261416669), (-0.19699089317458821, -0.27102292369657782, -0.0046069731261408897), (-0.31868770183919259, -0.10352150714022559, -0.0046069731261403346), (-0.31868770183919221, 0.10352156674487166, -0.0046069731261403346), 
  • 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-05-26T04:50:14+00:00Added an answer on May 26, 2026 at 4:50 am
    :g/./norm! 2Wi^M
    

    Explanation:

    • :g/./{cmd} will run the {cmd} on every line
    • norm! will execute the following string as normal mode commands
    • 2Wi^M Move 2 WORDS then insert a return
    • ^M is accomplished by pressing <c-v><cr> or <c-q><cr>.

    It is very tempting to do %norm! 2Wi^M, but this will fail as it messes up the lines that are being worked on.

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

Sidebar

Related Questions

I have several large csv files with thousands of columns that I need to
I have several large Javascript files that I need to document/digg into. Unfortunately I
I have a large table with a multi-part index. I need to run several
I have been working on large datasets lately (more than 400 thousands lines). So
I have several large MyISAM tables (data file around 1.5 GB) which I need
I have several large code bases which compile into dynamic libraries. I know that
I have several fairly large XML files that represent data exported from a system
I have several large projects that I work on. Depending on the project and
I have several large zip file that contain a dir structure that I must
I have several large files, each of which I want to chunk/split it in

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.