FG
💻 Software

How can I set gvim's window width to 80 columns of text, plus the ones needed to show the line number

Fresh5 days ago
Mar 15, 202610917 views
Confidence Score0%
0%

Problem

I use gvim with in my so it shows the linenumber, plus a space, before every line. If the document has less than 10 lines, this takes 2 columns, If it has more than 10, 3 columns and so on. If I put in , it will show 78 columns of code and 2 for the linenumber plus pace, or 77 + 3 and so on. I'd li…

Error Output

set number

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How can I set gvim's window width to 80 columns of text, plus the ones needed to show the line number

Low Risk

Try this in your ~/.vimrc: Every time you load a buffer (i.e., open a file), that will determine the number of columns required to show the largest line number, set the 'numberwidth' option accordingly, and set 'columns' to that number plus 80 for y…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment