Last active
June 12, 2019 22:44
-
-
Save seanh/4bf8f757ad23ca1fa28a88830e6a9f89 to your computer and use it in GitHub Desktop.
Revisions
-
seanh revised this gist
Jun 12, 2019 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,6 @@ obsession.vim cheatsheet ======================== [obsession.vim](https://github.com/tpope/vim-obsession) is simple, no-hassle Vim sessions from Tim Pope. It's a small plugin that just provides `:Obsession`, a better replacement for [the standard `:mksession` command](https://jvns.ca/blog/2017/09/10/vim-sessions/). -
seanh revised this gist
Jun 12, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,7 +34,7 @@ that just provides `:Obsession`, a better replacement for * Has an indicator for your status line, tab line or title string * [Airline](https://github.com/vim-airline/vim-airline) has a builtin extension for Obsession. Add `let g:airline#extensions#obsession#enabled = 1` to your vimrc to enable it. It just seems to put a `$` in the status line when Obsession is tracking a session, doesn't display the name of the session. -
seanh revised this gist
Jun 12, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ that just provides `:Obsession`, a better replacement for Passing a directory doesn't seem to work -- it produced an error from Vim. * `:Obsession!` stops recording the current session and deletes the session file. * To load a previously created session you do `vim -S <path_to_session_file>` or `:source <path_to_session_file>` as usual, rather than using the -
seanh revised this gist
Jun 12, 2019 . No changes.There are no files selected for viewing
-
seanh revised this gist
Jun 12, 2019 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ [obsession.vim](https://github.com/tpope/vim-obsession) is simple, no-hassle Vim sessions from Tim Pope. It's a small plugin that just provides `:Obsession`, a better replacement for [the standard `:mksession` command](https://jvns.ca/blog/2017/09/10/vim-sessions/). * Adds the `:Obsession` command: -
seanh renamed this gist
Jun 12, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
seanh created this gist
Jun 12, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,41 @@ [obsession.vim](https://github.com/tpope/vim-obsession) is simple, no-hassle Vim sessions from Tim Pope. * Adds the `:Obsession` command: * `:Obsession` with no argument creates a `Session.vim` file in the current directory and begins session tracking using that file. `:Obsession` while a session is already being tracked pauses session tracking and `:Obsession` while paused unpauses. * `:Obsession <directory_or_filename>` begins tracking a session with the given filename as the session file, or a `Session.vim` in the given directory. Will create the session file if it doesn't exist. Passing a directory doesn't seem to work -- it produced an error from Vim. * `:Obsession!` stops recording the current session and deletes it * To load a previously created session you do `vim -S <path_to_session_file>` or `:source <path_to_session_file>` as usual, rather than using the `:Obsession` command. You only use `:Obsession` to create a new session or to delete a session. If the session file is one created by Obsession, then sourcing it will automatically turn on Obsession's automatic session updating. * Automatically updates the session file before exiting Vim, and also whenever the layout changes (in case Vim crashes) * If you try to make a new session on top of an existing session it just lets you do it, instead of complaining * Has an indicator for your status line, tab line or title string * There's an Airline extension for Obsession. Add `let g:airline#extensions#obsession#enabled = 1` to your vimrc to enable it. It just seems to put a `$` in the status line when Obsession is tracking a session, doesn't display the name of the session. * If you want the size of your GVim window to also be recorded as part of your session add `set sessionoptions+=resize` to your gvimrc.