是否可以让gVim记住窗口大小? [英] Is it possible to get gVim to remember window size?

查看:342
本文介绍了是否可以让gVim记住窗口大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何在gVim中设置初始窗口大小,但是如何获得它自动恢复上次会话的窗口尺寸?这有可能吗?

I know how to set the initial window size in gVim, but how do I get it to automatically restore the window dimensions from last session? Is this even possible?

推荐答案

更正了我的答案.提到的winsize sessionoption仅指vim内部窗口布局,而不是外部尺寸.

Corrected my answer. The mentioned winsize sessionoption only refers to the vim internal window layout, not the external dimensions.

如果您使用

:mksession

并在启动vim时使用

gvim -S Session.vim

您可以通过在会话选项中包含winpos和resize来将窗口的位置和大小包含在会话中,请参见

you can include the window position and size into the session by including winpos and resize in the sessionoptions, see

:help  'sessionoptions

使用自动命令,您甚至可以在Vim进入和退出时自动执行会话的保存和恢复.

With autocommands you could even automate the saving and restoring of the session on Vim entry and exit.

这篇关于是否可以让gVim记住窗口大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆