A lua rewrite of emacs's iedit.
Edit one occurrence of text and simultaneously have other selected occurrences edited in the same way.
iedit.select()
.<esc>
to exit selection-mode and start iedit-mode.iedit.stop()
.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 ieditiedit.toggle()
- if iedit is on runs iedit.stop()
, otherwise runs iedit.select()
Whenever a new selection is started, iedit.stop()
is called automatically.
Using iedit.setup()
is not required, it just changes the config.
The default config is:
{
select={
map={
q={'done'},
['<Esc>']={'select','done'},
['<CR>']={'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.
If you want to donate then you need to find the correct link (hint: catorce):