Answers for "vim add character to end of multiple lines"

1

vim insert text at the the beginning of multiple lines

# Basic syntax:
# Insert text in front of every line in the file:
:%s!^!text_to_insert!

# Insert text in front of specific lines (e.g. for commenting out code):
1. Press ESC to ensure youre in command mode
2. Use CTRL+v to enter visual block mode
3. Move Up / Down to select the rows you want to prepend text to
4. Press SHIFT+i and type the text you want to insert (it will only
	show up on the current row for now)
5. Press ESC, wait ~1 second and the inserted text will appear on
	every line
Posted by: Guest on May-12-2021
0

put char at beginning of multiple lines vim

Press Esc to enter 'command mode'
Use Ctrl+V to enter visual block mode
Move Up/Downto select the columns of text in the lines you want to comment.
Then hit Shift+i and type the text you want to insert.
Then hit Esc, wait 1 second and the inserted text will appear on every line.
Posted by: Guest on December-18-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language