tpope / vim-obsession

obsession.vim: continuously updated session files
http://www.vim.org/scripts/script.php?script_id=4472
1.75k stars 68 forks source link

Need a command to stop updating the session file without delete it. #7

Closed bohrshaw closed 11 years ago

bohrshaw commented 11 years ago

Like "Obsession!" to stop updating the session file and "Obsession!!" to purge it.

tpope commented 11 years ago

I think :Obsession with no argument could be a toggle. Currently it just reinitializes recording to the same session file (i.e., a no-op).

Out of curiosity, what's your workflow for pausing like this? It feels a little weird to me because i see the two primary uses cases as

  1. Take a snapshot (:mksession)
  2. Set and forget (:Obsession)

If I want to stop recording, it's because I'm done with the task at hand, and I never ever ever want to see that session again.

bohrshaw commented 11 years ago

Sometime my session becomes a mess and I want to go back to a specific state, which is not convenient when Obsession continuously updating the session file.

As a solution to the above situation, switching to a new session when I want to preserve the current session state maybe a good choice. But I feel it more intuitive to just stop 'obsession'.

Sometime my session becomes some kind of stable and there's no need to continue 'obsession'. So I think as a tool to start to observe session state, the ability to stop is necessary, which increase its flexibility.

tpope commented 11 years ago

I think "sculpting" a session file is a neat idea. I've pushed up my proposed change.