In some colorschemes the current line highlighting changes background, in others, like Desert, the current line is underlined.
I want to change the current line highlighting in Desert to use a different background color instead of underlining. How can I do that?
My .vimrc
:
set cursorline highlight Cursorline cterm=bold
Update: .vimrc
that solves the issue
colorscheme desert set cursorline hi CursorLine term=bold cterm=bold guibg=Grey40
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.
You can either live with your "colorful" underline, or add cterm/guifg to make the underlined text and the underline same color.
To automatically highlight the current word, type z/ .
color desert set cursorline hi CursorLine term=bold cterm=bold guibg=Grey40
desert
is your colorscheme.(should come first)
put it in your ~/.vimrc
This works better (in every terminal) for me.
:hi CursorLine cterm=NONE ctermbg=darkred ctermfg=white
It is setting of color for terminal: background color - ctermbg, and text color - ctermfg. For using in graphical window, add parameters guibg=darkred guifg=white
You can highlight the corresponding column as well, using the command:
:set cursorcolumn
It is useful to toggle highlighting on and off by pressing one key in the editor. Add these line to your vimrc:
:nnoremap H :set cursorline! cursorcolumn!<CR>
typing 'H' will toggle highlighting on and off (Map it to another key if you want)
You can find more info in the article: http://vim.wikia.com/wiki/Highlight_current_line
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