true
⇄ false
, on
⇄ off
, etc.{
"iquzart/toggleword.nvim",
opts = {
key = "<leader>tt" -- optional, defaults to <leader>tt,
}
}
use {
"yourname/toggleword.nvim",
config = function()
require("toggleword").setup()
end,
}
- true ⇄ false
- on ⇄ off
- enabled ⇄ disabled
- yes ⇄ no
- up ⇄ down
- start ⇄ stop
- open ⇄ close
- allow ⇄ deny
- accept ⇄ reject
- read ⇄ write
- push ⇄ pull
- inbound ⇄ outbound
- public ⇄ private
- online ⇄ offline
- local ⇄ remote
- master ⇄ slave
- primary ⇄ replica
- active ⇄ passive
- manual ⇄ automatic
- prod ⇄ uat ⇄ dev ⇄ preprod (cyclical)
You can override the default list:
require("toggleword").setup {
key = "<leader>tw",
toggle_groups = {
{"start", "stop"},
{"open", "close"},
{"active", "inactive"},
}
}
Place your cursor on a supported word and press <leader>tt.
If the word matches a toggle pair, it will be replaced with the opposite.