moyiz/git-dev.nvim

Feature: Promote an ephemeral repo into a persisted repo

b0o opened this issue · 1 comments

b0o commented

Cool plugin! It would be cool if there were a command which would make an ephemeral cloned repo into a persistent, editable repo. For example, :GitDevPersist or :GitDevSave. Maybe with an optional argument to move the repo's root directory to a new path.

Thanks for suggesting a feature.

GitDevPersist sounds good to me. I am thinking to create an augroup per repository, rather than a single common group. Then, persist could simply remove the repository's group which might contain zero or more of:

  • The autocmd that deletes the repository when Neovim exits (if ephemeral).
  • The autocmd that sets buffers to read-only and non-modifiable (if read_only).

I am not sure yet how to handle opened buffers of the previous path.