vim - VIM中'wordwrap'设置中的'Cursorline'
问题描述
我正在使用 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
来完成你想要的。
推荐阅读
- javascript - 为什么单击我的动态创建的 html 会插入到最后一张循环卡上
- java - 为什么我会收到此错误 访问 stax 流时出错
- javascript - 从前端 fetch() 请求调用时,Express res.redirect() 不会重定向浏览器 URL
- java - 排除 JVM Jar 打开问题
- python - Python 中的 Adobe Acrobat API
- javascript - Laravel 5.6 - 使用 laravel-mix 拆分 vuejs 代码
- sql - 我可以使用 Pivot 或 Aggregation 并编写查询将多行转换为多列吗
- python - 如何在macos上更正图片tkinter messagebox tkinter
- python - 对于数据框,如何删除具有所有列的每一行等于无
- excel - 确定是否曾经保存过 Excel 工作簿?