Closed jasonkuhrt closed 9 years ago
I guess jk
is evil-escape ? This is the expected behavior then. ESC
in iedit-insert state
will go back to iedit state
.
The documentation is more comprehensive in the iedit-lisp-state
readme (but is evil-escape agnostic): https://github.com/syl20bnr/evil-iedit-state#state-transitions
I guess jk is evil-escape
Yes
This is the expected behavior then. ESC in iedit-insert state will go back to iedit state
You mean --INSERT MODE-- --> --NORMAL MODE--
?
So what I'm wondering is if we should support/invent this:
`spc s R` // Enter symbol-highlight-mode
`c e` // Enter insert mode
`ESC` // Exit insert mode (back to symbol-highlight-mode)
`ESC` // Exit symbol-highlight-mode (back to normal mode)
I see you enter the iedit
state from auto-highlight-symbol
.
There are 3 ways to enter the iedit
state:
SPC s h
or SPC s R
and press e
like you do (I think very few people does this)expand-region
on SPC v
(repeat v
to expand) and press e
(I think this is the most comfortable way to do it)SPC s e
Now I think you noticed that iedit
is composed of 2 states:
iedit
which is a normal state adapted to iedit occurrences navigationiedit insert
which is an insert stateWhen in iedit insert
:
ESC
will go in iedit
, pressing again will go in normal
jk
will go directly in normal
where you can press *
to reenable auto-highlight-symbol
Also don't forget that in iedit
state you can navigate easily between the occurrences with n
and N
and also change the scope of the edition to the function with F
, the line with L
and even incrementally above or bellow current point with J
and K
.
My advice is to use directly SPC s e
(which will select the symbol under point like auto-highlight-symbol
) and change the scope in iedit
.
Thanks for this great info it really helps. Maybe roll some of this into docs somewhere some day.
I'm glad to hear there is incremental ESC
, that's great! My question is then why doesn't jk
map to ESC
here? That's really a shame I think? Why can't we make evil-escape
work incrementally too. Its completely (seemingly, to me) the right thing to do. I see no value in complicating life with "different mental models for escape".
It's very hard to get the right behavior, when evil-iedit-state
was developed some users reported that it was annoying that pressing fd
(jk
) always returned to normal
state except in iedit insert
. They always get trapped in iedit
state thinking that fd
put them back in normal
state.
I also think that evil-escape
is meant to escape to normal state (it may be even in the description of the package) and I'm pretty sure that if I make an exception for iedit insert
a lot of users will be surprised.
I think that it is less damaging to press fd
and go back to normal
state where it is possible to SPC s e
again than staying in iedit
and doing some weird stuff on all the occurrences.
I consider this question answered. Feel free to reopen it if you think it should not be closed.
When doing
spc s R e
we enter a mode that is editing all instances of a word as found under the cursor. To begin editing I may do e.g.c e
only to have to escjk
after because I didn't edit the text exactly the way I wanted to. But when I do escape it exits me out of both:insert
modespc s R e
modeI wonder if this is something that would just be frustrating to newbs or if there is a genuine feature needed that allows a full stack of modes to be escapes vs a pop-escape trigger that only escapes the immediate mode...