cannot bind evil-next-visual-line for selection mode
Alan Schmitt
alan.schmitt at polytechnique.org
Mon Jan 19 14:16:01 CET 2015
On 2015-01-17 21:13, Frank Fischer <frank-fischer at shadow-soft.de> writes:
> Am 16.01.2015 um 16:20 schrieb Alan Schmitt:
>> On 2015-01-14 22:35, Frank Fischer <frank-fischer at shadow-soft.de> writes:
>>
>>> The selection has nothing to do with the motion. The cursor will move to
>>> the next visual line, but visual line mode *always* works on real lines,
>>> not visual lines. That's why the selection always extends to real lines.
>>> Dealing with selection of visual lines is not easy and there are many
>>> things to consider, and nobody has ever implemented this stuff, sorry.
>>
>> I'm sorry but I'm confused: I can get the behavior that I want using
>> 'gj' in visual mode. Why cannot I rebind this to another key?
>
> You have been talking about two things: moving the point along visual
> lines and the selection in visual line mode.
I'm sorry, this was not intentionally. In fact I don't understand what
this second thing is.
> The first thing can be done correctly, the second is not supported. Of
> course you can rebind any command to other keys and
>
> (define-key evil-motion-state-map "s" 'evil-next-visual-line)
>
> does indeed work. However, there might be other commands in higher
> priority keymaps, that's why you need at least
>
> (define-key evil-normal-state-map "s" nil)
>
> This is sufficient in the default configuration and also works in visual
> state because "s" is not bound (by default) in visual state. However,
> some packages install bindings in visual state (e.g. evil-surround).
This was it: I have evil-surround installed and I had to rebind 's' in
the evil-surround-mode-map. Everything works as expected now.
Thanks a lot,
Alan
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 494 bytes
Desc: not available
Url : https://lists.ourproject.org/pipermail/implementations-list/attachments/20150119/9dada6c0/attachment.pgp
More information about the implementations-list
mailing list