vim-obsession

obsession.vim: continuously updated session files

Github星跟踪图

obsession.vim

Vim features a :mksession command to write a file containing the current
state of Vim: window positions, open folds, stuff like that. For most of my
existence, I found the interface way too awkward and manual to be useful, but
I've recently discovered that the only thing standing between me and simple,
no-hassle Vim sessions is a few tweaks:

  • Instead of making me remember to capture the session immediately before
    exiting Vim, allow me to do it at any time, and automatically re-invoke
    :mksession immediately before exit.
  • Also invoke :mksession whenever the layout changes (in particular, on
    BufEnter), so that even if Vim exits abnormally, I'm good to go.
  • If I load an existing session, automatically keep it updated as above.
  • If I try to create a new session on top of an existing session, don't refuse
    to overwrite it. Just do what I mean.
  • If I pass in a directory rather than a file name, just create a
    Session.vim inside of it.
  • Don't capture options and maps. Options are sometimes mutilated and maps
    just interfere with updating plugins.

Use :Obsess (with optional file/directory name) to start recording to a
session file and :Obsess! to stop and throw it away. That's it. Load a
session in the usual manner: vim -S, or :source it.

There's also an indicator you can put in 'statusline', 'tabline', or
'titlestring'. See :help obsession-status.

Installation

If you don't have a preferred installation method, I recommend
installing pathogen.vim, and
then simply copy and paste:

cd ~/.vim/bundle
git clone git://github.com/tpope/vim-obsession.git
vim -u NONE -c "helptags vim-obsession/doc" -c q

Self-Promotion

Like obsession.vim? Follow the repository on
GitHub and vote for it on
vim.org. And if
you're feeling especially charitable, follow tpope on
Twitter and
GitHub.

License

Copyright © Tim Pope. Distributed under the same terms as Vim itself.
See :help license.

主要指标

概览
名称与所有者tpope/vim-obsession
主编程语言Vim Script
编程语言Vim script (语言数: 1)
平台
许可证
所有者活动
创建于2013-03-11 03:44:15
推送于2024-10-28 21:05:22
最后一次提交2024-10-27 09:53:53
发布数0
用户参与
星数1.8k
关注者数15
派生数67
提交数44
已启用问题?
问题数66
打开的问题数21
拉请求数7
打开的拉请求数3
关闭的拉请求数6
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?