Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/altermo/iedit.nvim
Edit one occurrence of text and simultaneously have other selected occurrences edited in the same way.
https://github.com/altermo/iedit.nvim
iedit lua neovim neovim-lua neovim-lua-plugin neovim-plugin nvim nvim-plugin
Last synced: about 1 month ago
JSON representation
Edit one occurrence of text and simultaneously have other selected occurrences edited in the same way.
- Host: GitHub
- URL: https://github.com/altermo/iedit.nvim
- Owner: altermo
- License: mit
- Created: 2024-03-09T08:55:55.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-25T07:21:25.000Z (about 2 months ago)
- Last Synced: 2024-07-25T08:39:36.528Z (about 2 months ago)
- Topics: iedit, lua, neovim, neovim-lua, neovim-lua-plugin, neovim-plugin, nvim, nvim-plugin
- Language: Lua
- Homepage:
- Size: 18.6 KB
- Stars: 20
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-neovim - altermo/iedit.nvim - Edit one occurrence of text and simultaneously have other selected occurrences edited in the same way. (Editing Support / Scrollbar)
README
# Iedit.nvim
*A lua rewrite of [emacs's iedit](https://github.com/victorhge/iedit).*Edit one occurrence of text and simultaneously have other selected occurrences edited in the same way.
## Usage
1. You start iedit with `iedit.select()`.
2. The text which will be used is word-under-cursor in normal mode, and visually selected in visual mode.
3. Selection-mode will be started. (where you can chose which occurrences of text you want to iedit)
4. You select which instances of text you want to iedit. (see config for keymaps)
5. You press `` to exit selection-mode and start iedit-mode.
6. You do some editing.
7. You stop iedit-mode with `iedit.stop()`.## Functions
+ `iedit.select()` - start selection for iedit; text will be word-under-cursor in normal mode and visually selected in visual mode.
+ `iedit.select_all()` - select all for iedit; text will be same as `iedit.select()`
+ `iedit.stop()` - stop iedit
+ `iedit.toggle()` - if iedit is on runs `iedit.stop()`, otherwise runs `iedit.select()`Whenever a new selection is started, `iedit.stop()` is called automatically.
## Setup & Config
Using `iedit.setup()` is **not required**, it just changes the config.
The default config is:
```lua
{
select={
map={
q={'done'},
['']={'select','done'},
['']={'toggle'},
n={'toggle','next'},
p={'toggle','prev'},
N={'next'},
P={'prev'},
a={'all'},
--Mapping to use while in selection-mode
--Possible values are:
-- • `done` Done with selection
-- • `next` Go to next occurrence
-- • `prev` Go to previous occurrence
-- • `select` Select current
-- • `unselect` Unselect current
-- • `toggle` Toggle current
-- • `all` Select all
},
highlight={
current='CurSearch',
selected='Search'
}
},
highlight='IncSearch',
}
```
Set `merge=false` in a (non-array) table in the config to **not merge** with the default config.## Alternatives
- [viedit](https://github.com/viocost/viedit)## Donations
If you want to donate then you need to find the correct link (hint: catorce):
+ [00]() [10]() [20]() [30]() [40]() [50]()
+ [01]() [11]() [21]() [31]() [41]() [51]()
+ [02]() [12]() [22]() [32]() [42]() [52]()
+ [03]() [13]() [23]() [33]() [43]() [53]()
+ [04]() [14](https://www.buymeacoffee.com/altermo) [24]() [34]() [44]() [54]()
+ [05]() [15]() [25]() [35]() [45]() [55]()