Categories: Web and IT News

Vim split to a specific size

Vim supports two kinds of splits: vertical (:vsplit) and horizontal (:split). You can open any file in a split by calling :split path/to/file or :vsplit path/to/file. By default, the full width or height of the current buffer will be divided in two. The new split will take up 50% of the available real estate, and the existing will be reduced to 50% of its original size.

But! Vim has a way to open splits to a specific size: By prepending a number to a split command, that split will be opened to the exact character width or height you specify. For example: :20 vsplit path/to/file will open a split that is exactly 20 characters wide, instead of 50% of the current width.

Note that the number includes the line numbers, gutter, and bar between buffers. For a vertical split, 4 characters will typically be lost to that space.

You can enter this with or without the space between the number. For example: :30split path/to/file and :30 split path/to/file will do the same thing.

We have written a ton about splits, so be sure to check the archives. Our post about resizing slits will come in handy paired with this tip.

The post Vim split to a specific size appeared first on VimTricks.

Vim split to a specific size first appeared on Web and IT News.

awnewsor

Recent Posts

HitPaw FotorPea V5.5.0 Launches Updated Image Creation System with AI Realism Enhancement

NEW YORK, N.Y., June 23, 2026 (PRESSRELEASECC NEWSWIRE) — HitPaw, a leading provider of AI-powered…

7 hours ago

Apptunix Launches Mobile App Development Services in Germany

Apptunix brings award-winning mobile app and AI product engineering to German businesses, offering tailored digital…

7 hours ago

Juicy Designs launches AI Visibility framework for South African businesses get cited in Google AI Overviews and ChatGPT

As consumers turn to AI for answers, the Pretoria agency helps businesses secure visibility where…

7 hours ago

Atomic Mail Builds Agent Email on Open JMAP Standard, Letting any AI Model Connect without a Proprietary SDK

Autonomous agents can connect through an MCP server, an AgentSkill or the JMAP API directly,…

7 hours ago

Bandwidth Launches ‘Build,’ Giving AI Agents Autonomous Access To the Bandwidth Communications Cloud

Enables AI agents and developers to autonomously activate communications services and launch voice applications in minutes…

7 hours ago

How the Dreamina Seedance 2.0 Mini Changes Online Video Making

A major shift is happening in the world of online media production right now. Creative…

7 hours ago

This website uses cookies.