How do you highlight the current line using Vim VS Code?
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>
Try this in your settings.json:
"workbench.colorCustomizations": {
"editor.lineHighlightBackground": "#ff0000"
}
This assumes that you have
"editor.renderLineHighlight": "line",
(that is the default) set to "line" or ""all".
[EDIT after your comment about selecting]
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.
Shiftv toggles visual line, not sure if you've discovered that yet or not.
It's worth pointing out that in Vim, you don't need to highlight to act on or manipulate the current line (as I see you're trying to do in your comment to another answer). In fact, it's often better/faster not to. For example:
If you find yourself in visual mode a lot, that can be a sign that you haven't yet become comfortable with text object motions and text object selection.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With