VS Code Vim:如何突出显示当前行? [英] VS Code Vim: How do you highlight current line?
问题描述
如何使用 Vim VS Code 突出显示当前行?
How do you highlight the current line using Vim VS Code?
这个功能会很棒.任何人都知道在 Vim VS Code 中是否可以进行此配置?http://vim.wikia.com/wiki/Highlight_current_line
This functionality would be awesome. Anyone know if this configuration is possible in Vim VS Code? http://vim.wikia.com/wiki/Highlight_current_line
特别是在光标移动后保持高亮:
Especially Highlighting that stays after cursor moves:
:nnoremap <silent> <Leader>l ml:execute 'match Search /\%'.line('.').'l/'<CR>
推荐答案
在 settings.json 中试试这个:
Try this in your settings.json:
"workbench.colorCustomizations": {
"editor.lineHighlightBackground": "#ff0000"
}
这假设你有
"editor.renderLineHighlight": "line",
(这是默认设置)设置为line"或all".
(that is the default) set to "line" or ""all".
[在您对选择发表评论后编辑]
我不确定您要做什么,但 Ctrl-C 选择当前行,Ctrl-I 突出显示整行但不选择它.在这两种情况下,移动光标后突出显示都不会停留在前一行.
I am not exactly sure what you are looking to do but Ctrl-C selects the current line and Ctrl-I highlights the entire line but doesn't select it. In neither case does the highlighting stay on a previous line after you move the cursor.
这篇关于VS Code Vim:如何突出显示当前行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!