dongnguyenltqb
1/4/2020 - 3:18 AM

nvim.txt

Using  Vim, you can split a window and look at and edit a file in two different places at the same time with the :sp command.    :vsp will split the window vertically.

Holding down ctrl-w and then w will move the cursor to the next window.

ctrl-w s can also be used the split a window and ctrl-w v will split the window vertically

:q will close the window you are currently in.

You can open a different window into a vertical split window with :vsp filename
And you can exchange two windows using ctrl-w x

Ctrl-w r will rotate my open windows and ctrl-w R will rotation the windows in the opposite direction.

Other shortcuts:
ctrl-w t = go to top left window
ctrl-w b = go to bottom right window
ctrl-w h = go one window to the left
ctrl-w k = go one window up
ctrl-w l = go one window to the right
ctrl-w j = go one window down

The windows can be resized  horizontally and vertically using :resize 

ctrl=w o = show only this window

buffers can be opened into split windows with :ba

see all the things you can do with ctrl-w type
:help ctrl-w