In the help for move:
:[range]m[ove] {address} *:m* *:mo* *:move* *E134*
Move the lines given by [range] to below the line
given by {address}.
and help for address:
Line numbers may be specified with: *:range* *E14* *{address}*
{number} an absolute line number
. the current line *:.*
$ the last line in the file *:$*
% equal to 1,$ (the entire file) *:%*
't position of mark t (lowercase) *:'*
'T position of mark T (uppercase); when the mark is in
another file it cannot be used in a range
/{pattern}[/] the next line where {pattern} matches *:/*
?{pattern}[?] the previous line where {pattern} matches *:?*
\/ the next line where the previously used search
pattern matches
\? the previous line where the previously used search
pattern matches
\& the next line where the previously used substitute
pattern matches
Each may be followed (several times) by '+' or '-' and an optional number.
This number is added or subtracted from the preceding line number.
it seems like :m+1
should move the current line "below the line" that is +1
the current line, so if I'm on line 7, it should move the current line below line 8, i.e. current line should be moved to line 9. At least this is how I've understood manual.
Furthermore, if I'm on line 7, it seems like both :m7
and :m6
do nothing (or just moves the cursor to the start of line 7).
Is there a reason for this behaviour or "convention"?
:m+1
you move the line below the following line. Then the following line moves one up, as you removed a line above it. – Ralf May 8 '19 at 15:10