VSCodeVim / VSCodeVim/Vim

Add setting to change the editor current line background color

Open
#4,760 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Is your feature request related to a problem? Please describe.
In VIM I use a different background color in the current line to know what is the VIM mode.

Describe the solution you'd like
I would like include something similar in vscode. For instance in current line background color (setting in vscode: editor.lineHighlightBackground) we could use the same color than defined in statusBarColorControl options.

Describe alternatives you've considered
I've used the statusBarColorControl setting but for me this is not enough.

Additional context
.vimrc

set cursorcolumn          "Highlight current column
set cursorline            "Highlight current row

" custom colors
function SetLinesDefault()
  hi CursorLine   cterm=NONE ctermbg=88
  hi CursorColumn cterm=NONE ctermbg=88
endfunction
function SetLinesHighlight()
  hi CursorLine   cterm=NONE ctermbg=28 ctermfg=15
  hi CursorColumn cterm=NONE ctermbg=28 ctermfg=15
endfunction

" hi clear CursorColumn
call SetLinesDefault()
autocmd InsertEnter * call SetLinesHighlight()
autocmd InsertLeave * call SetLinesDefault()

" Only highlight current window
augroup CursorLine
  au!
  au VimEnter,WinEnter,BufWinEnter * setlocal cursorline
  au VimEnter,WinEnter,BufWinEnter * setlocal cursorcolumn
  au WinLeave * setlocal nocursorline
  au WinLeave * setlocal nocursorcolumn
augroup END

vim_currentline_color

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No implementation files or tests are named; start by tracing how the statusBarColorControl setting is defined and applied in the extension. Define the requested current-line background behavior for the Vim mode states described in the issue, and verify that the editor line highlight changes accordingly.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.