Answers for "vim delete every other line"

1

vim delete from delimeter to end of line for all lines

# Basic syntax:
:%norm $T<delimiter>D
# Where:
#	- % indicates that the command should be applied on all lines
#	- norm indicates that the command is to be run in normal mode
#	- $T - not sure - probably something like "to end of line"
#	- D indicates delete
Posted by: Guest on July-22-2021
0

vim select lines and delete

# Press v and you are in visual mode
# Select the lines
# Press x
Posted by: Guest on March-31-2021
1

vim delete every other line

:g/^/+d  # Every other even line
Posted by: Guest on January-28-2022
1

vim delete every other line

:1d|g/^/+d  # Every other odd line
Posted by: Guest on January-28-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language