Answers for "move a line to another line vim"

9

vim move to specific line

# Basic syntax:
<number>+G # In Vi/Vim, type a number and hold down shift+g

# Example usage:
50G	# Moves you to line 50 in the document
Posted by: Guest on October-10-2020
1

move a line to another line vim

--- second line ---
--- third line ---
--- first line ---

# Move your cursor on the "first line" (the third line), use the *move* command and
# pass your desired line number as an argument. Hit enter.
#
# :3 --> <ENTER> --> :m0 --> <ENTER>
#
# or...
#
# :3m0 --> <ENTER>
Posted by: Guest on April-07-2021

Browse Popular Code Answers by Language