Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
Alan edited this pageApr 28, 2022 ·14 revisions

Using the builtin highlighter

This makes Kakoune visually wrap text to fit within the terminal, without actually modifying the content of the buffer (sometimes called "soft wrap").

addhlglobal/ wrap

Seethe highlighter documentation for more details about the wrap highlighter.

Automatically break lines at a fixed width

Theautowrap script included with Kakoune will automatically insert newline characters as you type. To turn it on, use theautowrap-enable command:

hookglobalWinSetOptionfiletype=mail %{setwindow autowrap_column72    autowrap-enable}

Semi-automatically breaking lines at a fixed width

Theautowrap script can be a bit quirky, so maybe you only want to rewrap paragraphs after you're finished with them, rather than while you're editing them, in the manner of Vim's= command. Here's a mapping that will do that:

mapglobal normal ='|fmt -w $kak_opt_autowrap_column<ret>'

This mapping pipes the selected text through thefmt command, but you can easily use a different tool likefold orpar if you prefer.

Note that this wraps to the value of theautowrap_column option, so you can mix fully-automatic and semi-automatic wrapping and have them be consistent with each other.

See also

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp