dorkhub

git-lens.vim

A vim9 plugin inspired by VSCode's GitLens.

Eliot00
Vim Script712 forksAGPL-3.0updated 2 years ago
git clone https://github.com/Eliot00/git-lens.vim.gitEliot00/git-lens.vim

git-lens.vim

A vim9 plugin inspired by VSCode's GitLens.

This plugin is written using vim9 script, make sure the output is 1 with the :echo has('vim9script') command in vim.

preview

Installation

Vim8 native pack system

Clone all file to your runtime's pack/**/start directory, like:

git clone git@github.com:Eliot00/git-lens.vim.git ~/.vim/pack/plugins/start

vim-plug

  1. Add the following line to your ~/.vimrc:
call plug#begin()
...
Plug 'Eliot00/git-lens.vim'
...
call plug#end()
  1. Run :PlugInstall.

Configuration

This plugin is default not enabled, you can use :call ToggleGitLens() to toggle this plugin. And if you want this plugin default enabled, just set the global variable g:GIT_LENS_ENABLED to true.

GIT_LENS_CONFIG

Here is a global dict g:GIT_LENS_CONFIG for customization:

g:GIT_LENS_CONFIG = {
    blame_prefix: '----', # default is four spaces
    blame_highlight: 'YourHighlight', # Comment
    blame_wrap: false, # blame text wrap
    blame_empty_line: false, # Whether to blame empty line.
    blame_delay: 200, # default is 500
}

Appreciation

This project is strongly inspired by GitLens and blamer.nvim.

more like this

vim-dap

Vim/Neovim debugger plugin providing a terminal interface to the Debug Adapter Protocol

Vim Script50

vim-halo

:innocent: Visual highlight for your cursor.

Vim script50

search

search projects, people, and tags