Then it's the time to think about multiple windows and it will helps a lot. Here is how vim looks like with multiple windows.
Basically, here I created three windows, left top, left bottom and the right one. Several interesting thing to mention here. First, as you can see, we are able to create vertically or horizontally separated windows. Then, we are able to crate multiple windows containing the same file. Finally, we have some important information for each window, the file name, the index of the buffer (the number before the file name), etc.
Here is how I use multiple windows.
To create new window:
- - Ctrl-w s will split the current window into two containing the same file.
- - :sp same as above.
- - :sp filename will create a new window with the file filename.
- - Ctrl-w v Split the current window vertically.
- - :vs same as above
- - :vs filename Vertical split with file filename.
- - h,j,k,l: Navigate: same as move the cursor.
- - x: Switch positions of two neighbor windows.
- - p: Go to previous windows, particularly useful when browsing between .h and .c files.
- - Ctrl-w c or :q
No comments:
Post a Comment