8000 Update instruction for autocmd to save session on write (#95) · Shatur/neovim-session-manager@16bda4f · GitHub
[go: up one dir, main page]

Skip to content

Commit 16bda4f

Browse files
authored
Update instruction for autocmd to save session on write (#95)
1 parent 4883372 commit 16bda4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ vim.api.nvim_create_autocmd({ 'User' }, {
7979
Example how to save session every time a buffer is written:
8080

8181
```lua
82-
vim.api.nvim_create_autocmd({ 'BufWritePost' }, {
82+
vim.api.nvim_create_autocmd({ 'BufWritePre' }, {
8383
group = config_group,
8484
callback = function ()
8585
if vim.bo.filetype ~= 'git'
8686
and not vim.bo.filetype ~= 'gitcommit'
8787
and not vim.bo.filetype ~= 'gitrebase'
88-
then session_manager.autosave_session() end
88+
then session_manager.save_current_session() end
8989
end
9090
})
9191
```

0 commit comments

Comments
 (0)
0