Carles Andres' avatarHomeBlog
Back to blog

Navigate your uncommitted changes in Neovim

Today I found myself wanting to navigate through my uncommitted git changes faster.

I had a hunch that gitsigns.nvim, which I've using for indicating which lines had changes, should be capable of it.

And... oh yeah! gitsigns has a family of commands just for that:

vim

You can replace setqflist with setloclist if you want the location list populated instead of the quickfix list.

After that, you can navigate your quickfix list as you normally would. This normally means :cn and :cp if you don't have vim-unimpaired, or ]q and [q if you do.](streamdown:incomplete-link)