Skip to content

Neovim plugin to "flip" the word under the cursor, i.e., replace it with an opposite word (antonym).

License

Notifications You must be signed in to change notification settings

evanasse/antonyms.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

antonyms.nvim

Neovim plugin to "flip" the word under the cursor, i.e., replace it with its antonym.

For example, replace the word 'true' with 'false'.

Installation

use {
    "evanasse/antonyms.nvim",
    requires { "tpope/vim-repeat" },
    config = function()
        require("antonyms").setup()
    end
}
{
    "evanasse/antonyms.nvim",
    dependencies = { "tpope/vim-repeat" },
    config = function()
        require("alterego").setup()
    end
}

Setup

(Optional) You can provide additional antonyms (word pairs) or overwrite the default ones.

require("antonyms").setup({
    antonyms = {
        { "young", "old" },
        { "light", "dark" }
    }
})

Usage

User command

:FlipWord

(Default) Keymap

<leader>0

Default Antonyms

true false
True False
TRUE FALSE
1 0
yes no

How to add custom antonyms

Vim command

:lua require("antonyms").add_antonyms({"word1", "word2"})

Setup

require("antonyms").setup({
    antonyms = {
        { "word1", "word2" }
    }
})

About

Neovim plugin to "flip" the word under the cursor, i.e., replace it with an opposite word (antonym).

Topics

Resources

License

Stars

Watchers

Forks

Languages