Search code examples
gitvimstylesgutter

Git Gutter to the Number Column


Since the Sign Column is limited to 2 chars (see here), is there a way to "move" the gitgutter's functionality to the Number Column? My first thought was to remove the number column and display the line numbers in the signs column, but it's not possible.

Let me explain:
There are some color groups in ViM and you can set different colors (foreground and background) to them (Number Column included). I want to show a green background in the number (only the number, not the entire line) for new lines, red for removed and yellow for changes.

My Problem: I have only one screen (1366x768) and my lines often break the 80 chars limit when splitting the screen with two files or more. Visually, it's a mess.

Take a look: the 'breaking' is when I split the screen and one line become two.

Again: is it possible to make such feature work?

I hope I've made myself clear.
Thank you.


Solution

  • Nope, not possible. You cannot color individual lines without using signs. And if a sign is present, the sign column is always present as well. You cannot use signs without a sign column. This is a limitation of Vim.

    Also, you cannot customize the content of the number column, aside from the built-in 'relativenumber' and 'number' options.