Skip to content

prichrd/flagmode.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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
    • Plug 'prichrd/flagmode.nvim'
  • packer
    • use 'prichrd/flagmode.nvim'

Usage

The documentation can be found at doc/flagmode.txt. You can also use the :help flagmode.nvim command inside of Neovim.

About

Toggle configurations quickly.

Topics

Resources

License

Stars

Watchers

Forks

Languages