-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added :ReaderMode and Updated README
- lua/readermode/init.lua -> added a :ReaderMode user command - added demo.gif to repo - README.md -> updated with gif, configuration options, and usage section
- Loading branch information
Showing
4 changed files
with
30 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,37 @@ | ||
# readermode.nvim | ||
|
||
Simple neovim plugin for keeping your cursor centered | ||
Simple neovim plugin for keeping your cursor centered while reading through code/text/whatever | ||
|
||
--- insert demo here | ||
![readermode.gif](readermode.gif) | ||
|
||
## Requirements | ||
|
||
- Neovim v0.7.0+ | ||
|
||
## Setup | ||
|
||
```lua | ||
{ | ||
'sarrisv/readermode.nvim' | ||
} | ||
``` | ||
### lazy.nvim | ||
|
||
## Usage | ||
```lua | ||
{ | ||
'sarrisv/readermode.nvim', | ||
opts = { --[[ Configurations Options ]] } | ||
} | ||
``` | ||
|
||
Turned off by default, toggle reader mode with a keymap to enable / disable | ||
### Configuration | ||
|
||
Default Keymap: | ||
```lua | ||
{ | ||
enabled = false, -- Turned off by default | ||
keymap = "<leader>R" -- Keymap used to toggle ReaderMode on/off | ||
} | ||
``` | ||
|
||
## Usage | ||
|
||
```lua | ||
vim.keymap.set({ "n", "i" }, M.opts.keymap, M.toggle, { silent = true }) | ||
``` | ||
Toggle **ReaderMode** using `:ReaderMode` or the provided *normal mode* keymapping | ||
|
||
## Credits | ||
|
||
Based on [this](https://stackoverflow.com/a/63326139) stackoverflow answer from user [pip](https://stackoverflow.com/users/8096230/pip) | ||
Inspired by [this](https://stackoverflow.com/a/63326139) stackoverflow answer from user [pip](https://stackoverflow.com/users/8096230/pip) |
This file contains 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 characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.