Skip to content

Problem with Vim background and terminal sizing.

Not downloaded yet

Whenever I open vim, the bottom and right edges are slightly smaller than the terminal window, causing an odd border, as so. How can I fix this?

4 points16 comments
Open on Reddit
About this post
Posted
Archived
Score
4 · 100% up
Kind
Image
ID
2itpko

Author

46
posts
64
comments
11
media
View profile

19 comments

I know the reason this happens, but I don't know how to fix it. The reason is that your font doesn't nicely match the size of the window.

As a simple example, say your window is 100x100 pixels. Your font is 7 pixels wide by 12 pixels tall per character. 100 / 7 = 14 r 2, and 100 / 12 = 8 r 4. This means you will have a border of 2x4 pixels.

That's the cause: anyone know of a way to fix it?

4 points

In awesome, you can configure it so that it doesn't use the window's size hints (size_hints_honor). Maybe your wm has something similar?

2 points

I have the same problem on i3 :(

2 points

Thats strange. I dont run into that problem using urxvt and vim in i3.

1 points
unknown author

Deleted before we saved it.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.