reddit / emacs

How to indent wrapped lines in visual-line-mode / org-indent-mode after the first line?

mustbenice90 · 2022-10-04 20:44
I'm in the process of trying to set up emacs to be comfortable enough to replace vim as my daily driver, but one issue I have that I cannot figure out how to change is the indentation of wrapped lines in visual line mode. In vim, I currently have it set up so that when a line soft wraps, it will be indented by one tab width compared to the first line, as seen here: [https://imgur.com/X6GTuaL](https://imgur.com/X6GTuaL) In emacs, I have visual-line-mode and org-indent-mode enabled, which makes the soft wrapped lines flush with the first line (seen here: [https://imgur.com/4xfBZnJ](https://imgur.com/4xfBZnJ)). I searched through google and any settings I could think of, but cannot find a way to indent the wrapped lines in emacs the same was as it is in vim. Is there a setting I'm missing, or a package that will do this for me? If not, is this something that could be done in lisp?
walseb · 2022-10-04 22:34
You can do this using [adaptive-wrap](https://elpa.gnu.org/packages/adaptive-wrap.html) like this: (use-package 'adaptive-wrap) (setq adaptive-wrap-extra-indent 2) (adaptive-wrap-prefix-mode)
mustbenice90 · 2022-10-04 23:06
Exactly what I was looking for. Thank you!
walseb · 2022-10-05 10:26
No problem!