Neovim plugin to "flip" the word under the cursor, i.e., replace it with its antonym.
For example, replace the word 'true' with 'false'.
- With packer.nvim
use {
"evanasse/antonyms.nvim",
requires { "tpope/vim-repeat" },
config = function()
require("antonyms").setup()
end
}
- With lazy.nvim
{
"evanasse/antonyms.nvim",
dependencies = { "tpope/vim-repeat" },
config = function()
require("alterego").setup()
end
}
(Optional) You can provide additional antonyms (word pairs) or overwrite the default ones.
require("antonyms").setup({
antonyms = {
{ "young", "old" },
{ "light", "dark" }
}
})
:FlipWord
<leader>0
true | false |
True | False |
TRUE | FALSE |
1 | 0 |
yes | no |
Vim command
:lua require("antonyms").add_antonyms({"word1", "word2"})
Setup
require("antonyms").setup({
antonyms = {
{ "word1", "word2" }
}
})