chore: update README.md
parent
cbdde13408
commit
06023617d7
30
README.md
30
README.md
|
|
@ -22,7 +22,6 @@ Forked from <a href="https://github.com/folke/persistence.nvim">Persistence.nvim
|
||||||
- [Usage](#rocket-usage)
|
- [Usage](#rocket-usage)
|
||||||
- [Default commands](#default-commands)
|
- [Default commands](#default-commands)
|
||||||
- [Telescope](#telescope)
|
- [Telescope](#telescope)
|
||||||
- [Lazy loading](#lazy-loading)
|
|
||||||
- [Helpers](#helpers)
|
- [Helpers](#helpers)
|
||||||
- [Configuration](#wrench-configuration)
|
- [Configuration](#wrench-configuration)
|
||||||
- [Defaults](#defaults)
|
- [Defaults](#defaults)
|
||||||
|
|
@ -81,20 +80,27 @@ lua << EOF
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Lazy loading
|
||||||
|
|
||||||
|
The plugin is designed to work with startup screens like [vim-startify](https://github.com/mhinz/vim-startify) or [dashboard](https://github.com/glepnir/dashboard-nvim) out of the box. It will never load a session automatically by default.
|
||||||
|
|
||||||
|
However, to lazy load the plugin add the `module = "persisted"` line to packer.
|
||||||
|
|
||||||
## :rocket: Usage
|
## :rocket: Usage
|
||||||
|
|
||||||
### Default commands
|
### Default commands
|
||||||
The plugin comes with a number of commands:
|
The plugin comes with a number of commands:
|
||||||
|
|
||||||
- `SessionToggle` - Determines whether to load, start or stop a session
|
- `:SessionToggle` - Determines whether to load, start or stop a session
|
||||||
- `SessionStart` - Start recording a session. Useful if `autosave = false`
|
- `:SessionStart` - Start recording a session. Useful if `autosave = false`
|
||||||
- `SessionStop` - Stop recording a session
|
- `:SessionStop` - Stop recording a session
|
||||||
- `SessionSave` - Save the current session
|
- `:SessionSave` - Save the current session
|
||||||
- `SessionLoad` - Load the session for the current directory and current branch if `git_use_branch = true`
|
- `:SessionLoad` - Load the session for the current directory and current branch if `git_use_branch = true`
|
||||||
- `SessionLoadLast` - Load the last session
|
- `:SessionLoadLast` - Load the last session
|
||||||
- `SessionDelete` - Delete the current session
|
- `:SessionDelete` - Delete the current session
|
||||||
|
|
||||||
> **Note:** The author only binds `SessionToggle` to a keymap for simplicity.
|
> **Note:** The author only binds `:SessionToggle` to a keymap for simplicity.
|
||||||
|
|
||||||
### Telescope
|
### Telescope
|
||||||
|
|
||||||
|
|
@ -104,12 +110,6 @@ Once opened, the available keymaps are:
|
||||||
* `<CR>` - Source the session file
|
* `<CR>` - Source the session file
|
||||||
* `<C-d>` - Delete the session file
|
* `<C-d>` - Delete the session file
|
||||||
|
|
||||||
### Lazy loading
|
|
||||||
|
|
||||||
The plugin is designed to work with startup screens like [vim-startify](https://github.com/mhinz/vim-startify) or [dashboard](https://github.com/glepnir/dashboard-nvim) out of the box. It will never load a session automatically by default.
|
|
||||||
|
|
||||||
However, to lazy load the plugin add the `module = "persisted"` line to packer.
|
|
||||||
|
|
||||||
### Helpers
|
### Helpers
|
||||||
|
|
||||||
The plugin sets a global variable, `vim.g.persisting`, which is set to `true` when a session is started. The author uses this to display an icon in their [statusline](https://github.com/olimorris/dotfiles/blob/0cdaee183c64f872778952f90f62b9366851101c/.config/nvim/lua/Oli/plugins/statusline.lua#L257).
|
The plugin sets a global variable, `vim.g.persisting`, which is set to `true` when a session is started. The author uses this to display an icon in their [statusline](https://github.com/olimorris/dotfiles/blob/0cdaee183c64f872778952f90f62b9366851101c/.config/nvim/lua/Oli/plugins/statusline.lua#L257).
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue