As you say "Or any other function in vim", I'll offer an alternative by recording a macro. Personally I like using macros for things like this because you perform the action you want to do once, which helps you to think through exactly what you want, then just repeat the same thing as many times as you need to.
There's almost certainly a more efficient way than the below, but hopefully this is a fairly straightforward way.
Start with your cursor anywhere in the first line.
qa (start recording a macro in register a
- you can substitute the a
for any other letter)
0 (move to the start of the line)
Next, perform whatever command you want to use to remove the first part of the line, for example: 3dw - if you need more complex rules to identify the part of the line to move, this is where you would do it.
$ (move to the end of the line)
aSPACEESCp (append a space at the end of the line, then paste the text we deleted previously)
j (move down a line, so we're in the next line when we finish this run of the macro)
q (stop recording)
Once you've completed this, the first line should be in the state that you want it, and your cursor will be in the second line. To repeat the above starting from your current position, just do:
@a (or whatever letter you chose in the first step in place of the a
).