weixin_39538687
weixin_39538687
2020-12-27 01:46

gissues swapfile clash

I have vim configured to put all swap files in a central place. Every time I try to open the issues list in more than one vim session, I get a swapfile clash as the buffer is simply called 'gissues'.

It'd be great if it could be something repository specific. Something like '$reponame.gissues' should suffice.

该提问来源于开源项目:jaxbot/github-issues.vim

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39616287 weixin_39616287 4月前

    That's interesting; I have swapfiles disabled, so I've never come across this.

    That being said, it shouldn't be doing that, because the code opens the Gissue buffer as "gissues/" + repourl + "/issues". Wonder where the hiccup is

    点赞 评论 复制链接分享
  • weixin_39538687 weixin_39538687 4月前

    Ah, apologies, I've mistyped. It's just issues.swp.

    If you collect swapfiles in one place (using set directory=/path/to/some/dir), the swapfile gets the name ${filename}.swp, without the path component.

    点赞 评论 复制链接分享
  • weixin_39616287 weixin_39616287 4月前

    That seems like a problematic design in Vim itself... I can think of several scenarios where I would have files with the same name open.

    点赞 评论 复制链接分享
  • weixin_39616287 weixin_39616287 4月前

    Yes, that would actually be a great solution to this, didn't know that was an option

    点赞 评论 复制链接分享
  • weixin_39538687 weixin_39538687 4月前

    PR inbound.

    点赞 评论 复制链接分享

相关推荐