3 ms·
A useful Vi/m feature is splitting viewports with Ctrl-w + v/s. Ctrl-w + v == split current viewport vertically Ctrl-w + s == split current viewport ho
by PyWoody 4y ago
A useful Vi/m feature is splitting viewports with Ctrl-w + v/s.
Ctrl-w + v == split current viewport vertically
Ctrl-w + s == split current viewport horizontally
Ctrl-w + = == resize viewports to equal height/widths
You can then move around the viewports with
Ctrl-w + j == move one viewport down from current viewport (if available)
Ctrl-w + k == moves one viewport up from current viewport (if available)
Ctrl-w + h == moves one viewport to the left from current viewport (if available)
Ctrl-w + l == moves one viewport to the right from current viewport (if available)
You can then :q viewports or :e to open a different file in that viewport.
Maybe it's so basic it never gets mentioned but I find a lot of people under utilize it.
Another good one is typing . to repeat previous command. You can do
A, "something"
and then just type `.` to have "something" appended to whatever line the cursor is on.