Vegard Øye | 1 Sep 14:18 2011
Picon

Re: Swapping "i" and "e" causes "ds" and "cs" to stop working

On 2011-08-31 20:07 +0200, York Zhao wrote:

> (define-key evil-motion-state-map "i" 'evil-forward-word-end)

This overwrites the bindings for inner text objects, which are bound
in `evil-motion-state-map' as "iw", "i(", etc.

Evil and evil-surround can be made more flexible in two steps:

1. Define the keymaps `evil-outer-text-objects-map' and
   `evil-inner-text-objects-map' for binding text objects, and have
   evil-surround use these maps. Evil commit 2104311 adds the keymaps,
   and I have created a pull request for evil-surround:

       https://github.com/timcharper/evil-surround/pulls

2. With the above in place, it might be more fitting to move text
   objects from Motion state to Visual state and Operator-Pending
   state (instead of having the latter two inherit from the former).
   Text objects have no function in modes that come up in Motion
   state, and as seen, they get in the way of rebinding.

--

-- 
Vegard
Vegard Øye | 1 Sep 14:54 2011
Picon

Re: evil: Input method gets reset when entering insert state

Fixed in commit 335a3c3.

--

-- 
Vegard
Vegard Øye | 1 Sep 14:55 2011
Picon

Re: Feature request: put the mode indicator more on the left

On 2011-08-31 23:50 +0200, Michael Markert wrote:

> As the mode-line-format var is already there (and the above is hacky)
> maybe allow nil and treat it as "evil won't add it on its own to the
> mode line"?

Added in commit 1ebd1ab.

--

-- 
Vegard
York Zhao | 1 Sep 18:38 2011
Picon

Re: Swapping "i" and "e" causes "ds" and "cs" to stop working

>> (define-key evil-motion-state-map "i" 'evil-forward-word-end)
>
> This overwrites the bindings for inner text objects, which are bound
> in `evil-motion-state-map' as "iw", "i(", etc.

I had actually figured this out by myself last night and did a quick fix by
using an advice on `surround-inner-overlay' function. But your changes are the
ultimate solution and again it was nicely designed and simplified my
customization a lot. Thank you very much.

> 2. With the above in place, it might be more fitting to move text
>   objects from Motion state to Visual state and Operator-Pending
>   state (instead of having the latter two inherit from the former).
>   Text objects have no function in modes that come up in Motion
>   state, and as seen, they get in the way of rebinding.

It might be a good idea but is it going to cause all the modes in
evil-motion-state to lose the ability to use texe objects?

York
Michael Markert | 2 Sep 06:24 2011

Re: Increment decrement number under cursor?

On 27 Aug 2011, Antono Vasiljev wrote:

> One difference i found: it does not increment numbers
> at end of word like vim does:

This works now.

> Probably you can share it as evil-incdecr?

No, but as evil-numbers: https://github.com/cofi/evil-numbers

So please test and have fun! :)

Michael
_______________________________________________
implementations-list mailing list
implementations-list <at> lists.ourproject.org
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
Timothy Harper | 2 Sep 20:35 2011
Picon

Re: Swapping "i" and "e" causes "ds" and "cs" to stop working


On Sep 1, 2011, at 6:18 AM, Vegard Øye wrote:

> On 2011-08-31 20:07 +0200, York Zhao wrote:
> 
>> (define-key evil-motion-state-map "i" 'evil-forward-word-end)
> 
> This overwrites the bindings for inner text objects, which are bound
> in `evil-motion-state-map' as "iw", "i(", etc.
> 
> Evil and evil-surround can be made more flexible in two steps:
> 
> 1. Define the keymaps `evil-outer-text-objects-map' and
>   `evil-inner-text-objects-map' for binding text objects, and have
>   evil-surround use these maps. Evil commit 2104311 adds the keymaps,
>   and I have created a pull request for evil-surround:
> 
>       https://github.com/timcharper/evil-surround/pulls
> 
> 2. With the above in place, it might be more fitting to move text
>   objects from Motion state to Visual state and Operator-Pending
>   state (instead of having the latter two inherit from the former).
>   Text objects have no function in modes that come up in Motion
>   state, and as seen, they get in the way of rebinding.
> 
> -- 
> Vegard

Sorry I didn't get to that pull request earlier. I didn't know what was motivating it, nor who epsilon47 was.
Merged in, thanks!
(Continue reading)

Antono Vasiljev | 3 Sep 05:01 2011

Re: Increment decrement number under cursor?

On Fri, 02 Sep 2011 06:24:05 +0200, Michael Markert <markert.michael <at> googlemail.com> wrote:

> > One difference i found: it does not increment numbers
> > at end of word like vim does:
> 
> This works now.
> 
> > Probably you can share it as evil-incdecr?
> 
> No, but as evil-numbers: https://github.com/cofi/evil-numbers

Great name :)

> So please test and have fun! :)

It only worked for me if defined like this:

  -(define-key 'evil-normal-state-map (kbd "C-c +") 'evil-numbers/inc-at-pt)
  -(define-key 'evil-normal-state-map (kbd "C-c -") 'evil-numbers/dec-at-pt)
  +(define-key evil-normal-state-map (kbd "C-c +") 'evil-numbers/inc-at-pt)
  +(define-key evil-normal-state-map (kbd "C-c -") 'evil-numbers/dec-at-pt)

It really works. Thank you for great plugin!

--

-- 
http://antono.info/
http://twitter.com/antono
http://github.com/antono
Michael Markert | 3 Sep 12:48 2011

Re: Increment decrement number under cursor?

On  3 Sep 2011, Antono Vasiljev wrote:

> On Fri, 02 Sep 2011 06:24:05 +0200, Michael Markert <markert.michael <at> googlemail.com> wrote:
>
>>> One difference i found: it does not increment numbers
>>> at end of word like vim does:
>>
>> This works now.
>>
>>> Probably you can share it as evil-incdecr?
>>
>> No, but as evil-numbers: https://github.com/cofi/evil-numbers
>
> Great name :)

Thought so, too. :)

>> So please test and have fun! :)
>
> It only worked for me if defined like this:
> -(define-key 'evil-normal-state-map (kbd "C-c +") 'evil-numbers/inc-at-pt)
> -(define-key 'evil-normal-state-map (kbd "C-c -") 'evil-numbers/dec-at-pt)
> +(define-key evil-normal-state-map (kbd "C-c +") 'evil-numbers/inc-at-pt)
> +(define-key evil-normal-state-map (kbd "C-c -") 'evil-numbers/dec-at-pt)

Oh, stupid mistake. Thanks for catching! Fixed in 6c6441e3.

> It really works. Thank you for great plugin!

Great :) Because of your 'plugin' cue I edited the emacswiki page for
(Continue reading)

Michael Markert | 3 Sep 13:25 2011

Differences to viper/vimpulse and vim-mode


In another post I mentioned that I edited the Evil emacswiki page and I
found there this:

> It would be nice with a brief overview over the objectives and
> difference to ViperMode.

I thought so, too. And found it difficult to promote evil myself to
others (mostly vimpulse users), because the main reason for myself using
evil is "vim-emulation done right".

I think this is best done not only as a feature list but also as a
compilation of opinions.

The first things I came up with:

Features:

- vim keyboard macros
  - recursive ones, too
- support for cursor functions (color and shape based on current mode)

as opposed to viper:

- vim-emulation
  - text objects (deletion, changing, ... of text "syntactically")
  - visual mode (esp. painless rectangular selection)
  - modal state key bindings
  - g* keys
  - ... (most of the other things that vimpulse added)
(Continue reading)

Vegard Øye | 4 Sep 12:53 2011
Picon

Re: Swapping "i" and "e" causes "ds" and "cs" to stop working

On 2011-09-01 18:38 +0200, York Zhao wrote:

> On 2011-09-01 14:18 +0200, Vegard Øye wrote:
>
>> With the above in place, it might be more fitting to move text
>> objects from Motion state to Visual state and Operator-Pending
>> state (instead of having the latter two inherit from the former).
>
> It might be a good idea but is it going to cause all the modes in
> evil-motion-state to lose the ability to use texe objects?

And this has been done in commit 4210051.

No, it won't lose anything because text objects have no function in
Motion state /per se/. What you probably want to do (and this is still
possible) is to create a Visual selection in a buffer that came up in
Motion state (e.g., "viwiw"). But this calls the text object ("iw") in
Visual state, not Motion state; if you were to call a text object in
Motion state, nothing would happen.

The only reason text objects were bound in `evil-motion-state-map' was
so that Visual state and Operator-Pending state could inherit the
bindings from that keymap. Now that text objects bindings have their
own keymaps, this is no longer necessary.

--

-- 
Vegard

Gmane