A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/mrloop/telescope-git-branch.nvim below:

mrloop/telescope-git-branch.nvim: Find which files and preview what changes have been made on your git branch across multiple commits

Telescope Git Branch is a Telescope extension that searches a Git branch for files which are different from the default branch, previews a diff of the changes and allows you to open files that are different from the default branch.

The telescope-git-branch.nvim extension is great for working with feature branches, where you want to easily see the differences between the default branch and the feature branch. It lets you search for differences across multiple commits on the same branch.

You can install these plugin using your favorite vim package manager, e.g. vim-plug and lazy.

lazy:

{
    'mrloop/telescope-git-branch.nvim'
}

vim-plug

Plug 'https://gitlab.com/mrloop/telescope-git-branch.nvim'

Activate the custom Telescope commands and git_branch extension by adding

require('telescope').load_extension('git_branch')

somewhere after your require('telescope').setup() call. This is typically all you need to configure the plugin.

The following Telescope extension commands are provided:

These commands can also be used from your init.lua.

For example, to bind files to <leader>gf use:

-- Search for the files with differences to default branch.
vim.keymap.set({'n', 'v'}, '<leader>gf', function()
    require('git_branch').files()
end)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4