10/25/17

How to insert charachter/text into multiple lines in the Vi Editor

  1. Press <Esc> to enter command mode
  2. Press <Ctrl> + <V> to enter visual block mode
  3. Move <Up> / <Down> to select the columns of text in the lines you want to insert text
  4. Hold down <Shift> + <i> and type the text you want to insert
  5. Press <Esc> , then wait 1 second and the inserted text will appear on every line you selected in step 3
  6. Press <w> (To save) And <q> (To exit Vi), if you're done editing this file

Credit: Original Tip found at https://stackoverflow.com/a/253391

No comments:

Quick HTTP to HTTPS - Apache2

There are several methods for redirecting your Apache-based website visitors who might type your servers URL using the plain (non-secure) HT...