This only happens in python-mode. When I try to use a text object to, for example, change everything inside or around some brackets (eg ci() it instead edits the first line of the file. So if I have this:

from somewhere import something something("hello")

and my cursor is on the hello and I type ci( then it changes to:

fg something("hello")

with my cursor between the f and the g. This happens no matter what else is in the file.

Try to edit inside quotes (eg ci")also fails but in a different way. It just drops into insert mode and leaves the contents unchanged.

Any ideas where I should start with tracking down the source of this issue?

  • 1
    Can't reproduce this here. Bisect your configuration by starting out with emacs -Q and enabling evil manually to find a good state, then recursively comment out your init file to find the offending part of it. If even emacs -Q behaves faulty and upgrading packages doesn't help either, hand in a detailed bug report at their issue tracker. – wasamasa Dec 23 '14 at 11:07
  • Did something clobber your keybindings? When in normal state, do C-h k c: it should be bound to evil-change. Hit c so that you're in operator-pending state. Hit C-h k i -- it should still be waiting for you to finish the text object. Hit ( to complete the text object: it should be bound to evil-inner-paren. – Dan Dec 23 '14 at 11:12
  • Thanks for the help guys. I'm not even sure what I did that fixed it in the end (should have tracked that better so I could answer the question!) – Thomas Parslow Feb 18 '15 at 11:06
  • // , @ThomasParslow, yeah, I code Python and use Emacs Evil-mode, too. scared – Nathan Basanese Jun 10 '15 at 7:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.