https://github.com/iquzart/toggleword.nvim
Smart word toggling under the cursor for Neovim
https://github.com/iquzart/toggleword.nvim
lazyvim neovim neovim-plugin packer toggle toggleword
Last synced: 26 days ago
JSON representation
Smart word toggling under the cursor for Neovim
- Host: GitHub
- URL: https://github.com/iquzart/toggleword.nvim
- Owner: iquzart
- License: mit
- Created: 2025-07-14T07:19:45.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-07-25T09:59:02.000Z (9 months ago)
- Last Synced: 2025-08-02T09:43:32.343Z (9 months ago)
- Topics: lazyvim, neovim, neovim-plugin, packer, toggle, toggleword
- Language: Lua
- Homepage:
- Size: 23.4 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-neovim - iquzart/toggleword.nvim - Toggle between common code keywords under the cursor such as true ⇄ false, on ⇄ off, enabled ⇄ disabled, and dev ⇄ prod. (Utility / Cursorline)
- trackawesomelist - toggleword.nvim (⭐2) - Toggle between common code keywords under the cursor such as true ⇄ false, on ⇄ off, enabled ⇄ disabled, and dev ⇄ prod. (Recently Updated / [Jul 29, 2025](/content/2025/07/29/README.md))
- awesome-neovim-sorted - iquzart/toggleword.nvim
README
toggleword.nvim
A minimal Neovim plugin to toggle boolean-like words under your cursor.
## Features
- Toggle common values like `true` ⇄ `false`, `on` ⇄ `off`, etc.
- Minimal, fast, and Lua-native.
- Configurable keybinding.
- Custom toggle pairs supported.
## Installation
### Lazy.nvim:
```lua
{
"iquzart/toggleword.nvim",
opts = {
key = "tt" -- optional, defaults to tt,
}
}
```
### packer.nvim:
```lua
use {
"yourname/toggleword.nvim",
config = function()
require("toggleword").setup()
end,
}
```
### Supported words
```
- 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)
```
### Custom Toggle Pairs
You can override the default list:
```lua
require("toggleword").setup {
key = "tw",
toggle_groups = {
{"start", "stop"},
{"open", "close"},
{"active", "inactive"},
}
}
```
### Usage
```
Place your cursor on a supported word and press tt.
If the word matches a toggle pair, it will be replaced with the opposite.
```