5

When i press ) in Vim it jumps to the next sentence. In evil, however, ) (evil-forward-sentence) at the beginning of the following paragraph takes you to the paragraph's end, while in Vim it jumps to "Donec a diam":

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor.

Is this a bug or a config error on my side?

6

The problem is a configuration "error": the paragraph you pasted has sentences separated by a single space, and your setup is probably expecting sentences to be separated by two spaces.

The simplest solution is to (setq sentence-end-double-space nil). As the manual on "Sentences" notes, though, doing so is not without drawbacks:

If you want to use just one space between sentences, you can set the variable sentence-end-double-space to nil to make the sentence commands stop for single spaces. However, this has a drawback: there is no way to distinguish between periods that end sentences and those that indicate abbreviations. For convenient and reliable editing, we therefore recommend you follow the two-space convention.

  • This is weird. Who writes with two spaces between sentences? Even the manual on sentences doesn't do that. Oh emacs... – Jason Mirk Jul 30 '15 at 15:08
  • 3
    Actually, I do, for one. Way back in the day, that's how we were taught in typing class, and there's a long debate about whether you should or should not use the two-space convention (cf. wikipedia article on sentence spacing). I find it especially helpful when using monospaced fonts, as it helps me see sentence beginnings/endings more easily. – Dan Jul 30 '15 at 15:11
  • That's interesting. – Jason Mirk Jul 30 '15 at 15:13
  • @JasonMirk I think it would also be safe to say that most young people do not double space their sentences, and that the practice is gradually dying out due to well-tuned fonts. – PythonNut Jul 30 '15 at 16:18
  • I remember reading in a computational linguistics book that [\.!\?] space capital-letter is actually a pretty good heuristic for sentence divisions in English text. Is there a way to use an arbitrary function for dividing sentences? – Gregory Nisbet Sep 18 '15 at 15:22

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.