GithubHelp home page GithubHelp logo

benson9954029 / boole.nvim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nat-418/boole.nvim

0.0 0.0 0.0 332 KB

Neovim plugin for toggling booleans, etc.

License: BSD Zero Clause License

Lua 100.00%

boole.nvim's Introduction

boole.nvim ๐Ÿ”›

Boole is a simple Neovim plugin that extends the default increment and decrement functionality of CTRL-A and CTRL-X to allow for toggling boolean values like on, yes, and true as well as cycling through:

  • Days of the week and their abbreviations (e.g., Monday โ†’ Tuesday)
  • Months of the year and their abbreviations (e.g., Jan โ†’ Feb)
  • X11 / Web color names (e.g., Orange โ†’ OrangeRed)
  • Canonical hours (e.g., Compline โ†’ Vigil)
  • Letter + number "words" (e.g., F1 โ†’ F2)

This plugin ships one command:

  • :Boole {increment|decrement}

This command can be safely mapped to CTRL-A and CTRL-X. See the configuration section below for an example.

Installation

$ git clone --depth 1 https://github.com/nat-418/boole.nvim ~/.local/share/nvim/site/pack/boole/start/boole.nvim

Configuration

Boole can be mapped to a key by passing a configuration table to the setup function. You can also add any cycle of words you would like. Feel free to submit an issue and pull request with additions you think would make good defaults.

require('boole').setup({
  mappings = {
    increment = '<C-a>',
    decrement = '<C-x>'
  },
  -- User defined loops
  additions = {
    {'Foo', 'Bar'},
    {'tic', 'tac', 'toe'}
  },
  allow_caps_additions = {
    {'enable', 'disable'}
    -- enable โ†’ disable
    -- Enable โ†’ Disable
    -- ENABLE โ†’ DISABLE
  }
})

boole.nvim's People

Contributors

benson9954029 avatar github-actions[bot] avatar jrowlingson avatar lamprospitsillos avatar nagy135 avatar nat-418 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.