奇怪的 Vim 内边框

发布于 2025-01-04 18:45:10 字数 786 浏览 2 评论 0 原文

我在 Windows 8 中使用 gVIM,自从我第一次打开它以来,右侧和底部总是有那些奇怪的边框:

正常窗口 [全尺寸图片] gVIM borders

全屏 [全尺寸图片] - 更大的边框,看看右侧和底部的绿色虚线区域 gVIM borders - fullscreen

已恢复

gVIM borders - returned

我使用的

set guioptions-=m
set guioptions-=t
set guioptions-=T
set guioptions-=r
set guioptions-=L

是没有滚动条和菜单。

知道如何删除左侧的那些边框吗?


附加信息:在 Windows XP 和 17" 显示屏上以 1280x1024 进行测试。 21"5 中 1920x1080 的 Windows 8 也有同样的问题。

I'm using gVIM with Windows 8, and since first time I opened it theres always those strange borders at right and bottom sides:

normal window [full size image]
gVIM borders

fullscreen [full size image] - even bigger borders, look at the green dotted area at right and bottom
gVIM borders - fullscreen

restored

gVIM borders - restored

Im using

set guioptions-=m
set guioptions-=t
set guioptions-=T
set guioptions-=r
set guioptions-=L

so no scrollbars and menus.

Any idea of how to remove those borders as in the left side?


Additional information: Tested in Windows XP with 1280x1024 in a 17" display.
And Windows 8 with 1920x1080 in a 21"5, same problem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

黒涩兲箜 2025-01-11 18:45:11

我也遇到过这个问题,但一直没有找到好的解决方案。对我有用的是更改字体/字体大小以及可能的窗口管理器(在 Linux 上)。

:set guifont=*

更新:切换到 Neovim 和 nvim-qt 完全为我解决了这个问题!

I've enocuntered this problem as well, but never found a great solution. What worked for me was changing the font/font-size and possibly the windowmanager (on Linux).

:set guifont=*

Update: Switching to Neovim and nvim-qt solved this issue entirely for me!

绝不服输 2025-01-11 18:45:11

我不确定你是否可以删除这个边框。我像你一样关闭了 gVim 的所有 gui 元素,并且得到了相同的边框,只是在更大的屏幕上最大化时我的边框稍大。

我想它将显示尺寸四舍五入到最接近的整个字符块。

I'm not sure if you can remove this border. I have all the gui elements turned off for gVim like you and i get the same border, only mine is slightly bigger when being maximised on a larger screen.

I would imagine it's rounding the display size to nearest whole character block.

青丝拂面 2025-01-11 18:45:11

对于 Windows,使用不同版本的 fullscreen.dll 很好地解决了这个问题。

https://github.com/xqin/gvimfullscreen

For windows, using a different version of the fullscreen.dll solved this issue nicely.

https://github.com/xqin/gvimfullscreen

画中仙 2025-01-11 18:45:11

该插件解决了全屏模式下灰色内边框的问题:
https://github.com/derekmcloughlin/gvimfullscreen_win32

看起来对代码的微小更改将允许相同的功能在窗口模式下修复(黑色而不是灰色)。

我真的很推荐这个插件,它让 Windows 下的 gvim 值得我使用!

This plugin solved the grey inner border in fullscreen mode:
https://github.com/derekmcloughlin/gvimfullscreen_win32

Looks like a minor change to the code would allow the same fix (black color instead of grey) in windowed mode.

I really recommend this plug, it makes gvim in windows worth using for me!

记忆之渊 2025-01-11 18:45:11

这是你的guioptions造成的。
当在一行上设置 guioptions 时,我可以在 Windows 7 上可靠地重现此问题。

我通过单独设置以下 guioptions 来修复它(每个选项都在新行上):

set guioptions-=T "remove toolbar
set guioptions-=r "remove right-hand scroll bar
set guioptions-=L "remove left-hand scroll bar. Fix for TagBar.

This is caused by your guioptions.
I can reliably reproduce this issue on Windows 7 when setting guioptions on one single line.

I fixed it by setting the following guioptions individually (each option on a new line):

set guioptions-=T "remove toolbar
set guioptions-=r "remove right-hand scroll bar
set guioptions-=L "remove left-hand scroll bar. Fix for TagBar.
梦里的微风 2025-01-11 18:45:11

我在 urxvt 中使用 gvim 时遇到了这个问题。

将 urxvt internalBorder 更改为 0 为我解决了这个问题。

I was having this problem using gvim in a urxvt.

Changing the urxvt internalBorder to 0 resolve this for me.

浸婚纱 2025-01-11 18:45:10

我能够通过使用以下内容创建 ~/.gtkrc-2.0 在 Ubuntu 13.04 中修复此问题:

style "vimfix" {
  bg[NORMAL] = "#242424" # this matches my gvim theme 'Normal' bg color.
}
widget "vim-main-window.*GtkForm" style "vimfix"

I was able to fix this in Ubuntu 13.04 by creating ~/.gtkrc-2.0 with the following contents:

style "vimfix" {
  bg[NORMAL] = "#242424" # this matches my gvim theme 'Normal' bg color.
}
widget "vim-main-window.*GtkForm" style "vimfix"
风柔一江水 2025-01-11 18:45:10

我知道,这是一个老问题。我没有永久的解决方案,但我找到了一个很好的解决方法:

  1. 切换到旧式 Windows 主题,您可以逐个修改颜色。在我的系统上,我有“高对比度黑色”,它具有“正确”的设置,无需修改。无论如何,任何旧式主题都可以。
  2. 这些 gVim“边距”选取旧式主题的“3D 对象”参数的颜色。将此参数设置为您希望边距为的任何颜色——我选择黑色。
  3. 启动 gVim
  4. 切换回您常用的 Windows 主题。

边距仍然存在,但它们将是黑色的(或您选择的任何颜色),因此它们不仅不会那么明显,它们还会让您的眼睛适应在黑暗的房间中使用 gVim,低对比度主题。当然,每次启动 gVim 时都必须执行此操作。

An old question, I know. I don't have a permanent solution, but I have figured out a good workaround:

  1. Switch to an old-style Windows theme, one you can modify color-by-color. On my system, I have 'high-contrast black', which has the "right" settings without modification. Regardless, any old-style theme will work.
  2. Those gVim "margins" pick up the color of the '3D Objects' parameter of the old-style theme. Set this parameter to whatever color you want the margins to be--I choose black.
  3. Start gVim
  4. Switch back to your usual Windows theme.

The margins will still be there, but they'll be black (or whatever color you choose), so they'll not only be less noticeable, they'll also let your eyes adjust to using gVim in a dark room with a dark, low-contrast theme. Of course, you'll have to do this every time you start gVim.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文