What is the best way to highlight the whole current line in VIM? In some IDEs I am able to set some sort of 20% opacity of the line I am editing, this is great to find where I am rather quickly.
If you want to select the entire line in a file, press V. Now when you press k or j to go up and down, vim will select the entire line above and below your cursor.
Use ctrl+v to select a column of text consisting of the first character of the place you want your new column to go in front of. Use I to go into insert mode, and type one space. Press Esc, and you'll see you have inserted a column of single spaces. Now use ctrl+v again to highlight the column of spaces.
To highlight the current line use
:set cursorline
To highlight the current column use
:set cursorcolumn
The visual appearance of this can be modified. Have a look around :help hl-CursorLine
or hl-CursorColumn
.
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