Set column width for visual lines in Emacs

こ雲淡風輕ζ 提交于 2019-12-06 21:51:06

问题


Is there an equivalent to the fill-column variable for the "Wrap" mode (visual-line-mode) in Emacs? If not, how could I set a limit on the length of visual lines when the window/frame of the buffer is wider ?


回答1:


In response to this question I created a minor mode called window-margin that accomplishes what @Stefan suggested in his answer.

Turn on window-margin-mode with:

(add-hook 'text-mode-hook 'turn-on-window-margin-mode)

The way you can still do it without installing window-margin is to use the longlines-mode that ships with Emacs, but is being phased out since there are some problems with longlines-mode, but here's the old way to do it if you want:

Turn on longlines-mode with something like:

(add-hook 'text-mode-hook 'longlines-mode)

which wraps text at the fill-column.




回答2:


longlines-mode is being phased out. For visual-line-mode, the simplest way is to make the window as narrow as you want it to be be. You can do that with C-x 2 and then adjusting the size of the window. Or you can set a wide margin or wide fringes.



来源:https://stackoverflow.com/questions/14009223/set-column-width-for-visual-lines-in-emacs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!