回答:
'textwidth' 'tw' number (default 0)
local to buffer
{not in Vi}
Maximum width of text that is being inserted. A longer line will be
broken after white space to get this width. A zero value disables
this. 'textwidth' is set to 0 when the 'paste' option is set. When
'textwidth' is zero, 'wrapmargin' may be used. See also
'formatoptions' and |ins-textwidth|.
When 'formatexpr' is set it will be used to break the line.
NOTE: This option is set to 0 when 'compatible' is set.
'wrapmargin' 'wm' number (default 0)
local to buffer
Number of characters from the right window border where wrapping
starts. When typing text beyond this limit, an <EOL> will be inserted
and inserting continues on the next line.
Options that add a margin, such as 'number' and 'foldcolumn', cause
the text width to be further reduced. This is Vi compatible.
When 'textwidth' is non-zero, this option is not used.
See also 'formatoptions' and |ins-textwidth|. {Vi: works differently
and less usefully}
それらを次の行に送る長い行の自動折り返しを参照する場合は、試してください
:set textwidth=0
:set wrapmargin=0
gqして段落を手動でテキスト幅に再調整することはできません。@Engineeroは正しいものである必要があります。
他の答えはどれもうまくいきませんでした(IDKの理由)。
:set wrap! (GVim for Windowsを使用して)私にとってはトリックでした。
wrap行の折り返しのように見えますが、実際にはテキストを新しい行に分割しません。おそらくwrap有効にしていたので:set wrap!、オフに切り替えました。:set wrap?現在の値をエコーするかどうかを確認できます(つまり、wrapまたはnowrap)。
textwidthしましたwrapmarginが、これは実際にはvimを改行せずに更新して再レンダリングすることを強制しました。
set formatoptions-=tトリックを行う必要があります。set formatoptions+=t自動折り返しをオンに戻します。
何ができるかformatoptionsについての詳細は、ドキュメントを参照してください。
行の折り返しを無効にするには、:set wrap!このコマンドを入力する
か、に追加します~/.vimrc。
:set nowrap改行の挿入ではなく、行の表示の折り返しを防ぐだけです。