I\'m stuck and cannot escape. It says:
\"type :quit to quit VIM\"
But when I type that it simply appears in the object body.>
The question has been asked here.
The q
command with a number closes the given split in that position.
:q
or :
will close the split in that position.
Let's say your Vim window layout is as follows:
-------------------------------------------------
| | | |
-------------------------------------------------
| | | |
| | | |
| Split 1 | Split 2 | Split 3 |
| | | |
-------------------------------------------------
If you run the q1
command, it will close the first split. q2
will close the second split and vice versa.
The order of split position in the quit command does not matter. :2q
or :q2
will close the second split.
If the split position you pass to the command is greater than the number of current splits, it will simply close the last split.
For example, if you run the q100
on the above window setup where there are only three splits, it will close the last split (Split 3).