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 8847677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:14:49+00:00 2026-06-14T12:14:49+00:00

I am using VIM to clean up a data source, and format it properly

  • 0

I am using VIM to clean up a data source, and format it properly for use with SIMILE Timeline.

VIM works great, but as far as I know it can’t be automated, so I was thinking of using something like SED to clean up the datasource. I know SED can be used to do search and replace, but when I use VIM to clean the data up, I use a combination of VIM macros and vim regex search and replace.

Is there any equivalent to VIM macros in SED?

  • 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-14T12:14:50+00:00Added an answer on June 14, 2026 at 12:14 pm

    For very simple text processing (i.e. using Vim like an enhanced ‘sed’ or ‘awk’, maybe just benefitting from the enhanced regular expressions in a :substitute command), use Ex-mode.

    REM Windows
    call vim -N -u NONE -n -es -S "commands.ex" "filespec"
    

    Note: silent batch mode -s-ex messes up the Windows console, so you may have
    to do a cls to clean up after the Vim run.

    # Unix
    vim -T dumb --noplugin -n -es -S "commands.ex" "filespec"
    

    Attention: Vim will hang waiting for input if the “commands.ex” file doesn’t
    exist; better check beforehand for its existence! Alternatively, Vim can read
    the commands from stdin. You can also fill a new buffer with text read from
    stdin, and read commands from stderr if you use the – argument.

    For more advanced processing involving multiple windows, and real automation
    of Vim (where you might interact with the user or leave Vim running to let the
    user take over), use:

    vim -N -u NONE -n -c "set nomore" -S "commands.vim" "filespec"
    

    Here’s a summary of the used arguments:

    -T dumb           Avoids errors in case the terminal detection goes wrong.
    -N -u NONE        Do not load vimrc and plugins, alternatively:
    --noplugin        Do not load plugins.
    -n                No swapfile.
    -es               Ex mode + silent batch mode -s-ex
                      Attention: Must be given in that order!
    -S ...            Source script.
    -c 'set nomore'   Suppress the more-prompt when the screen is filled
                      with messages or output to avoid blocking.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Vim for editing source code, but I would also like to have
I'm using vim 6.3.81 on a xterm through putty. When I use set mouse=a
I'm sick of using vim to develop on some far Amazon-ec2 machine. I'm wondering
I've started using Vim some time ago. So far - I enjoyed my experience
I am using Vim to edit a Java file, but I find the way
I'm using vim to edit files that use a programming language where the end
I am using vim with NERDTree to develop, but not good at it. I
I've been using Vim for a while now and love it, but one thing
Using vim + php + ctags I can get fairly good php auto-completion. But
I would like to know which keys (or keystrokes) would you use to replace

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.