Set Window Size VIM Command

How to use Set Window Size Command in Linux VIM editor?

Explanation


You can resize the active window by adding a number arguments by using split command. The number argument specifies the height of the new window.

Usage:

<count>split<filename>

Example:

  • Open the 'two.txt' file
    $ vim two.txt
  • To open the file 'three.txt' in the split window with the window height of 4.
    Enter :4split three.txt
  • Height of file 'three.txt' is resized by 4 lines
    resize split window size vim

Ask Questions

Ask Question