奇怪的 Vim 内边框
我在 Windows 8 中使用 gVIM,自从我第一次打开它以来,右侧和底部总是有那些奇怪的边框:
正常窗口 [全尺寸图片]
全屏 [全尺寸图片] - 更大的边框,看看右侧和底部的绿色虚线区域
已恢复
我使用的
set guioptions-=m
set guioptions-=t
set guioptions-=T
set guioptions-=r
set guioptions-=L
是没有滚动条和菜单。
知道如何删除左侧的那些边框吗?
附加信息:在 Windows XP 和 17" 显示屏上以 1280x1024 进行测试。 21"5 中 1920x1080 的 Windows 8 也有同样的问题。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
我也遇到过这个问题,但一直没有找到好的解决方案。对我有用的是更改字体/字体大小以及可能的窗口管理器(在 Linux 上)。
更新:切换到 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).
Update: Switching to Neovim and nvim-qt solved this issue entirely for me!
我不确定你是否可以删除这个边框。我像你一样关闭了 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.
对于 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
该插件解决了全屏模式下灰色内边框的问题:
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!
这是你的guioptions造成的。
当在一行上设置 guioptions 时,我可以在 Windows 7 上可靠地重现此问题。
我通过单独设置以下 guioptions 来修复它(每个选项都在新行上):
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):
我在 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.
我能够通过使用以下内容创建
~/.gtkrc-2.0
在 Ubuntu 13.04 中修复此问题:I was able to fix this in Ubuntu 13.04 by creating
~/.gtkrc-2.0
with the following contents:我知道,这是一个老问题。我没有永久的解决方案,但我找到了一个很好的解决方法:
边距仍然存在,但它们将是黑色的(或您选择的任何颜色),因此它们不仅不会那么明显,它们还会让您的眼睛适应在黑暗的房间中使用 gVim,低对比度主题。当然,每次启动 gVim 时都必须执行此操作。
An old question, I know. I don't have a permanent solution, but I have figured out a good workaround:
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.