Aditya Morolia
Aditya Morolia

Reputation: 61

Is there a way to show both line numbers and git status in vim when using the airblade/vim-gitgutter plugin?

In the gitgutter readme, the demo screenshot shows both line numbers and git status, as follows:

screen

But when I add the plugin, it suppresses the line numbers and only shows git status, as here:

screen.

Is there a way to show both?

Upvotes: 1

Views: 1484

Answers (1)

Aditya Morolia
Aditya Morolia

Reputation: 61

Use set signcolumn=yes for vim to always show the signcolumn (i.e., the column where the git status is shown.) Both git status and line number will be visible. set signcolumn=number will merge signcolumn with the number column (works for vim version 8.1 and above). In this case the git status will be visible if there is an update, line number otherwise.

Thanks @romainl who basically answered it in the comment.

Upvotes: 5

Related Questions