'Cursorline' 在 'wordwrap' 的设置中 VIM

'Cursorline' in the setting of 'wordwrap' in VIM

我正在使用 VIM 编写一些文档,我不喜欢创建自己的换行符。相反,我只使用“:set nowrap&”和“set lbr”。我还激活了“设置光标线”。

问题是光标线会在整个文本块而不是我正在处理的行下划线。

有没有办法让 cursorline 假装我的软包装线只是普通线?

来自:h cursorlinopt

'cursorlineopt' 'culopt' string (default: "number,line")
          local to window
          {not available when compiled without the +syntax
          feature}
  Comma separated list of settings for how 'cursorline' is displayed.
  Valid values:
  "line"      Highlight the text line of the cursor with
          CursorLine hl-CursorLine.
  "screenline"    Highlight only the screen line of the cursor with
          CursorLine hl-CursorLine.
  "number"    Highlight the line number of the cursor with
          CursorLineNr hl-CursorLineNr.

您可以使用 set cursorlineopt=number,screenline 来完成您想要的。