reddit / emacs

evil mode parentheses

yotam901 · 2022-09-16 23:21
In evil mode, is there a somehow built-in functionality to make ci( behave like in vim, that means when for example this line of code int main() { When in normal mode and the cursor is on the beginning and you press ci( you begin to insert inside the parentheses, while in evil-mode, you have to move to one of them or inside of them then press ci(
tom_dl · 2022-09-17 05:40
There isn't, but it's something I plan to work on. In the meantime, I believe evil-targets does "seeking", which I think is what you want.
TheFrenchPoulp · 2022-09-17 12:37
I did hear about that once. Does Vim do that by default in the latest versions? If so it could be reported to Evil, if not already
[deleted] · 2022-09-17 13:10
[deleted]
olikn · 2022-09-17 14:15
version: VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep 01 2022 21:10:19) i) "inner block", select \[count\] blocks, from "\[count\] \[(" to the matching ')', excluding the '(' and ')' (see \[(). If the cursor is not inside a () block, then find the next "(".
ALLCAPSNOBRAKES · 2022-09-18 16:45
it's not built-in but the package [evil-surround](https://github.com/emacs-evil/evil-surround) implements it.
yotam901 · 2022-09-18 19:11
I don't think it implements this specific behavior. I'm trying to change the text inside the parentheses, not change the surrounding characters for something else
ALLCAPSNOBRAKES · 2022-09-18 19:43
hmm you're right. i use evil mode and i have this behavior, so it must be built in, as i dont use any other evil extensions.
yotam901 · 2022-09-18 19:54
Are you sure you have the behavior described in the post? I'm up to date with evil's main branch and I don't have this behavior
ALLCAPSNOBRAKES · 2022-09-18 20:08
it doesn't seek to parentheses, brackets or curly braces for me either. i apologize.