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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:17:34+00:00 2026-05-26T16:17:34+00:00

NOTE This was flagged as a potentially subjective question, but it is not subjective.

  • 0

NOTE

This was flagged as a potentially subjective question, but it is not subjective. It is requested to learn the various specific ways that people use Vim so that a person coming from a “mouse-and-keyboard” oriented text editor might learn more of the Vim way of editing.

This is not a subjective question about personal preferences or which editor or editing style is best.

This is a specific question about the mechanical steps one would take to obtain an outcome in the Vim editor, using alternative editors as a baseline for cross-reference.

PROBLEM

Suppose you have the following code in your Vim and you want to get from before to after where before looks like this:

// Before //

$mynames    = Array();
$mynames['alice'] = 'alpha';

… and after looks like this …

// After //

$mynames    = Array();
$mynames['alice'] = 'alpha';
$mynames['betty'] = 'bravo';
$mynames['cindy'] = 'charlie';
$mynames['deana'] = 'delta';

HOW NON-VIM EDITORS WOULD DO IT

Using a non-vim editor, programmer A would simply copy the first line for alice, paste it multiple times into the editor and then re-edit the values so that alice and alpha are replaced with the appropriate values, editing one line at a time.

Using a non-vim editor, programmer B would create a rectangular selection that spans four lines, and just start typing the common text $mynames[”] = ”; and then go back and fill in the appropriate values, editing one line at a time.

HOW ABOUT VIM?

Given that Vim is a significantly different approach from “mouse-and-keyboard” style editors of the day, this is a request for insight on the specific steps one takes in editing with Vim. Obviously, it is possible to just type each line individually, but it is assumed that there is a time-saving way to do this in Vim in a way that compares to what programmer A and programmer B did above.

1) How would a vim programmer go about doing this edit operation, using a time-saving method like those above?

2) If someone were to search the Internet for more examples of specific ‘step-by-step’ comparisons of Vim editing sessions vs “mouse-and-keyboard” style editing, what would one search for?

  • 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-26T16:17:35+00:00Added an answer on May 26, 2026 at 4:17 pm

    I use the same, first i copy a line. then pasting it any times what i need.

    Then you can create a macro to edit a keys. When cursor is on first line where i need to work. (a frist pasted line)

        qq f[ci'<C>-<o>q  "recordes a macro to find a [block] and 
    change inner quotes ' and stays in insert mode
    

    Then you can play your macro any time by @q . (I have a map Q = @q for fast macro start by Shift+q)
    The same way you can use for values:

     qq f=f'ci'<C>-<o>q
    

    Macro for find a value block and go to insert mode.

    And the answer for comparsion i will save time to move my hand from keyboard to mouse times = number of edit lines. Selecting a block for changing. Vim is more productive no doubt.

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

Sidebar

Related Questions

Note This is not a REBOL-specific question. You can answer it in any language.
[Note: This question is very similar, but not quite the same.] I'm trying to
(NOTE: This question is not about escaping queries, it's about escaping results) I'm using
NOTE: This question is only loosely related to tinyxml, however including details like that
Note: This question uses jQuery but the question has nothing to do with jQuery
Probably this question was already asked before, but my google-fu and SO-Search did not
Note: This question originally applied to Xapian , but due to cross-platform issues and
NOTE: This is not the same question as Python: Persistent shell variables in subprocess
Note This originally started as a question about 404 errors, but now it's a
Note: this is NOT like this question I've been tasked to construct a survey

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.