vimemacsclojureevil-mode

Evil Emacs mode: sentence motions and other questions


I love vim. It gives me the feeling that I am reaching directly into the text and bending it to my will.

That said. I also like Clojure, and Clojurescript, and Lisp, and Org-mode. I really, really tried to like Emacs, in Evil mode, and I gave it 6-8 weeks before I gave up in frustration.

I'm considering trying again, because I've seen some really great examples of Literate Programming using ractive.js and org-mode. But I want to plan ahead this time. I have a short list of things that I want to know how to do before I just charge in willy-nilly (if, in fact, I am brave enough to go for it again):

Editor wars are silly, emacs has a lot going for it, but I like home row! Is there a way I can get the power of the emacs operating system while keeping this decent editor I've learned?


Solution

  • Now do you have more precise question ?

    edit: on going to the end of a sentence:

    So, evil uses evil-forward-sentence but yes, it doesn't have the same behaviour than in vim (see comment). Emacs has forward-sentence but it has the same behaviour. I couldn't find a function with the desired effect.

    forward-sentence is based on the sentence-end variable (see it with M-x ielm), which is a regexp defining end of lines. So it's possible to re-define it. Here's a simple example that needs to be extended:

        (setq sentence-end "[\\.\\?\\!] +") ;; . or ? or ! followed by spaces.
    

    now forward-sentence will stop at the next point. We can remap evil's ):

        (define-key evil-normal-state-map ")" 'forward-sentence)