I just noticed that entering :q1
closes the file I currently have open (I found this by typo-ing :q!
)
Based on commands like 2dd
(delete two lines) or 2j
(move down two lines), I would have expected :2q
to "quit two files" (although, if I open two files with vi -O testfile1 testfile2
, :2q
only closes one of them - and so does :q2
).
Is the number after :q
simply discarded? Or is it having some effect that I haven't been able to determine?
And, more generally - how could I answer this question for myself? I checked usr_21.txt| Go away and come back
in Vim help, but found nothing about this behaviour. I even checked the famous question, but no-one had mentioned anything about this.