Decrease Window Size VIM Command

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

Explanation


<count>Ctrl+w - command is used to decrease the horizontal split window size in vim editor. Count specifies number of lines to be decreased.

Usage:

<count>Ctrl+w -

Example:

  • Open the 'one.txt' file
    $ vim one.txt
  • Open the file 'two.txt' in the split window
    Enter :split two.txt
    decrease window size
  • Now decrease the current window size by 9 lines.
    Press 9 Ctrl+w -
    decrease window size

Ask Questions

Ask Question