I have the following wrapped text, especially when you use a lot of windows:

dmg shop keukendump

I'm wondering if the indentation of wrapped text could be changed like in Vim:


When figuring out, it seems the AutoFillMode is responsible for this. I was hoping this might be improved in Emacs 25. After upgraded to a compiled binary of Emacs 25, I see the same behaviour.

So I'm wondering if I could solve this in an another way?


After M-x package-install RET adaptive-wrap RET:

(setq-default adaptive-wrap-extra-indent 2)
(add-hook 'visual-line-mode-hook #'adaptive-wrap-prefix-mode)
(global-visual-line-mode +1)
| improve this answer | |
  • adaptive-wrap-prefix-mode is not a global mode by default. But you can make it global if you like and not tie it with the activation of visual-line-mode. – Kaushal Modi Aug 8 '15 at 18:49
  • Surprising to see how easily this could be achieved. Why is this not included in the default package of Emacs? – ReneFroger Aug 8 '15 at 19:38
  • The package itself is in ELPA, so that could be fairly easily arranged, at least from a legal standpoint. I'd much rather have Tetris be the external package and adaptive-wrap be built-in but such is life. – PythonNut Aug 8 '15 at 19:56
  • 2
    @PythonNut On further thought, I might start doing just what you do.. enable adaptive-wrap-prefix-mode using the visual-line-mode-hook :) – Kaushal Modi Jan 6 '16 at 19:27
  • 1
    @kaushalmodi Thanks for the tip. I fixed this in my config a while ago (idk, there's some other stuff in that commit too :|), but I haven't updated my answer. Should be updated now. – PythonNut Jan 6 '16 at 19:44

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.