macvim-dev / macvim-dev/macvim
Feature request: reopen files on launch
还没有人认领这个 Issue。
- 主要语言
- Vim Script
- 星标
- 7.9k
- 派生
- 691
- PR 合并指标
- 30 天内没有已合并 PR
描述
I'm really enjoying using MacVim – however one feature that I really miss from Sublime Text is the ability for the editor to automatically reopen whatever files were open when it last exited. Do you know if there are any plans to add this behavior to MacVim?
I'm guessing the simplest way to achieve this would be to store the arglist of each active vim process (i.e. one arglist per GUI window) on quit, and then on startup you could automatically spawn a new GUI window for each of these stored arglists – but then again I'm quite new to Vim and I don't know anything about the internals of MacVim so this could be a terrible approach :)
N.B. I'm not talking about restoring the full session state (tabs/splits/etc), seeing as that can easily be accomplished with autocommand-triggered user scripts via :mksession and :source. The missing piece of the puzzle seems to be automatically spawning the vim instances with the correct arglist in the first place…
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先跟踪 MacVim 的启动和退出行为,然后检查如何保存和恢复每个 GUI 窗口的 arglist。将所请求的行为与 issue 中现有的使用 :mksession 和 :source 的 workaround 进行比较。当之前打开的文件能够在相应的 GUI 窗口中重新打开,且不需要完整恢复 session 时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- macos, vim
- 领域
- desktop
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100