vim/nvim not filling windows terminal [closed]
Asked Answered
E

8

15

I'm runing nvim through wsl2 on ubuntu. However if I use the windows terminal nvim or vim will not fill the whole terminal

enter image description here

How can I get rid of those black borders?

It works just fine if I use the Ubuntu terminal. But I'd prefer to use the Windows Terminal enter image description here

Eolanda answered 25/6, 2020 at 15:3 Comment(4)
From the images I honestly cannot see the problem you mention.Noisome
I edited the first screenshot with arrows to make it more clear.Eolanda
ah ok thanks I see it nowNoisome
What does your profile for this shell look like in settings.json?Noisome
N
14

In your profile in settings.json add this: "padding" : "0, 0, 0, 0"

Noisome answered 25/6, 2020 at 17:17 Comment(1)
For the lazy, "padding": "0" also works.Wappes
K
9

With "padding": "0" I still got the black bar on the right, to get rid of it set "scrollbarState": "hidden"

Kafka answered 12/8, 2022 at 20:57 Comment(0)
B
7

Actually,I set "padding": "0" and scrollbarState": "hidden".

It shows here.

There is still a distance at the bottom of Windows terminal where the content is never displayed.

Blinny answered 16/5, 2023 at 13:2 Comment(0)
S
6

It occured to me recently, but I found a way to deal with it.
Open the settings.json and then add "padding": "0, 0, 0, -3",.

At least it works for me.

Salisbarry answered 14/8, 2023 at 18:31 Comment(2)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Sancha
thanks for the "-3", didn't realise you could have negative values and this got rid of the extra padding at the bottom of the screen for me!Resht
C
3

On Windows Terminal Preview

  1. Go to Settings > Profiles > YOUR_TERMINAL > APPEARANCE
  2. Set Padding to 0
  3. Set Scrollbar Visibility hidden
  4. Hit save.

Like so:

Windows Terminal Ubuntu Profile

Cheongsam answered 16/8, 2023 at 21:52 Comment(0)
T
2

Font size was the issue for me. I had increased it to '14' from the default '12' but changed it back to '12' and the gaps on the right and bottom are now gone.

Tamarind answered 6/10, 2023 at 23:56 Comment(0)
C
1

For me very interesting configuration helped))

  1. I am using windows terminal with Nerd Fonrs and with default font size 14px
  2. I am using windows with such screen settings

enter image description here

I've added next to terminal settings.json (see padding property)

enter image description here

After that I still have some paddings, which removed with zoom in or out (ctrl + or ctrl -), once I am zoom in or zoom out twice, padding removed.

I guess, it also could be remove by changing the display settings or font size.

Celio answered 25/2 at 13:40 Comment(0)
S
0

This does not appear to be an issue with NVim. The Windows Terminal simply has padding on all the sides of the terminal window, to get rid of it adjust the padding in the terminal settings.json file. Here is a breakdown of all the text configuration settings.

Shari answered 25/6, 2020 at 17:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.