Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prichrd/flagmode.nvim
Toggle configurations quickly.
https://github.com/prichrd/flagmode.nvim
neovim neovim-plugin
Last synced: 12 days ago
JSON representation
Toggle configurations quickly.
- Host: GitHub
- URL: https://github.com/prichrd/flagmode.nvim
- Owner: prichrd
- License: mit
- Created: 2022-05-11T12:54:25.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-11-06T18:02:16.000Z (about 2 years ago)
- Last Synced: 2024-08-02T18:37:15.048Z (4 months ago)
- Topics: neovim, neovim-plugin
- Language: Lua
- Homepage:
- Size: 6.84 KB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- my-neovim-pluginlist - prichrd/flagmode.nvim - commit/prichrd/flagmode.nvim) ![](https://img.shields.io/github/commit-activity/y/prichrd/flagmode.nvim) (Other Standard Feature Enhancement / Number)
README
# flagmode.nvim
This plugin helps you enable and disable configurations using flags. Flagmode
comes with a basic set of functionalities allowing the user to:* Register flags with `flagmode.register`
* Toggle a flag with `flagmode.toggle`
* Activate a flag with `flagmode.activate`
* Deactivate a flag with `flagmode.deactivate`Here is an example of a flag called `relative_number` that allows a user to
toggle the relative numbering.```lua
require('flagmode').register('relative_number', {
activate = function() vim.opt.relativenumber = true; end,
deactivate = function() vim.opt.relativenumber = false; end,
})
```The flag can now be toggled with:
```
:FlagToggle relative_number
```## Installing
Flagmode requires Neovim and follows the standard runtime package structure.
It is possible to install it with all popular package managers:* [vim-plug](https://github.com/junegunn/vim-plug)
* `Plug 'prichrd/flagmode.nvim'`
* [packer](https://github.com/wbthomason/packer.nvim)
* `use 'prichrd/flagmode.nvim'`## Usage
The documentation can be found at [doc/flagmode.txt](doc/flagmode.txt). You can
also use the `:help flagmode.nvim` command inside of Neovim.