Sunday, 24 May 2020

Comment out all lines in VI Editor

Commenting Multiple Lines

    1. First, press ESC
    2. Go to the line from which you want to start commenting. Then, press ctrl + v, this will enable the visual block mode.
    3. use the down arrow to select multiple lines that you want to comment.
    4. Now, press SHIFT + I to enable insert mode.
    5. Press # and it will add a comment to the first line. Then press ECS and wait for a second, # will be added to all the lines.

No comments:

Post a Comment