windows - Vim 的 mksession 不保存窗口最大化状态
问题描述
我使用Vim的Obsession 插件,但是每次我:source
打开会话文件时,窗口都不记得它被最大化了(当我关闭它时)。它确实记得其他一切。
我的会话选项是:
sessionoptions=blank,buffers,curdir,folds,help,options,tabpages,winsize,terminal,resize,winpos
我在 Windows 10 上使用gVim 8.1和以下插件:
Plug 'Valloric/YouCompleteMe', { 'do': function('BuildYCM') }
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'hzchirs/vim-material'
Plug 'kristijanhusak/vim-hybrid-material'
Plug 'https://github.com/tpope/vim-surround.git'
Plug 'https://github.com/tpope/vim-obsession.git'
Plug 'https://github.com/tpope/vim-unimpaired.git'
Plug 'https://github.com/tpope/vim-repeat.git'
Plug 'https://github.com/terryma/vim-multiple-cursors.git'
Plug 'airblade/vim-gitgutter'
Plug 'https://github.com/ctrlpvim/ctrlp.vim.git'
Plug 'scrooloose/nerdcommenter'
Plug 'https://github.com/octol/vim-cpp-enhanced-highlight.git'
Plug 'luochen1990/rainbow'
Plug 'https://github.com/tomtom/tlib_vim.git'
Plug 'https://github.com/MarcWeber/vim-addon-mw-utils.git'
Plug 'https://github.com/garbas/vim-snipmate.git'
Plug 'https://github.com/honza/vim-snippets.git'
我尝试从我的 _vimrc 文件中删除set lines
andau GUIEnter * winpos
只是为了尝试一些东西,但问题仍然存在。
有任何想法吗?谢谢!
解决方案
SessionLoadPost
加载会话后,您可以使用autocmd 执行其他工作。
augroup more_lines
autocmd!
autocmd SessionLoadPost * set lines=999
augroup END
如需更多帮助,请参阅:
:h 'lines'
:h SessionLoadPost
推荐阅读
- regex - 使用正则表达式将多个类别 URL 重定向到一个类别 URL
- python - 什么是操作系统窗口中用于 voila list 和 voila stop 的命令行脚本?
- angular - 如何在 Angular 8、主机 URL 和 API URL 中更改环境 .ts 变量或常量?
- apache-kafka-streams - Kafka Stream Listener 中的多个主题
- vue.js - 使用 v-show 在 vue js 和 bootsrap 中显示微调器
- google-sheets - 谷歌表格中的查询第一个结果不是日期
- java - 按特定条件在列表中查找对象
- vue.js - 父母和孩子可以听同一个事件并将数据合并在一起 - Vue吗?
- mysql - 如何修复预览图层地理服务器中显示的此错误?
- javascript - 当数据有两部分Reactjs时如何对表格进行排序