Skip to content
This repository was archived by the owner on May 29, 2023. It is now read-only.

Commit 199504c

Browse files
committed
Add Neovim consideration
1 parent 0f62541 commit 199504c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
```
44
```vim
55
" Feel free to use this alternative to the plugin's core autosave and session management features:
6-
au BufLeave,CursorHold,CursorHoldi,FocusLost * if (&buftype == '') | do BufWritePre | silent! update | endif
7-
au VimEnter * nested if (len(v:argv) == 2) | silent! source Session.vim | mksession! | endif
8-
au VimLeave * if (len(v:argv) == 2) | mksession! | endif
6+
au BufLeave,CursorHold,CursorHoldi,FocusLost * if (&buftype == '') | do BufWritePre | silent! update | do BufWritePost |endif
7+
au VimEnter * nested if (len(v:argv) == 1) | silent! source Session.vim | mksession! | endif
8+
au VimLeave * if (len(v:argv) == 1) | mksession! | endif
9+
" v:argv length check may need to be 2 if using Neovim since it includes an --embed argument on launch
10+
" v:argv doubles for both stdin and argful cases (instead of argc() and a StdinReadPre autocmd flag)
911
```
1012
---
1113
<p align="center">

0 commit comments

Comments
 (0)