Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Eliot00/git-lens.vim
A vim9 plugin inspired by VSCode's GitLens.
https://github.com/Eliot00/git-lens.vim
blame git vim vim-plugin vim9-plugin vim9-script
Last synced: 8 days ago
JSON representation
A vim9 plugin inspired by VSCode's GitLens.
- Host: GitHub
- URL: https://github.com/Eliot00/git-lens.vim
- Owner: Eliot00
- License: agpl-3.0
- Created: 2022-08-21T05:34:37.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-14T13:14:32.000Z (7 months ago)
- Last Synced: 2024-04-15T13:21:14.440Z (7 months ago)
- Topics: blame, git, vim, vim-plugin, vim9-plugin, vim9-script
- Language: Vim Script
- Homepage:
- Size: 48.8 KB
- Stars: 50
- Watchers: 3
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 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](https://user-images.githubusercontent.com/18375468/185842698-f84c7c55-fdbe-4573-817c-e19934c0e436.gif)
## Installation
### Vim8 native pack system
Clone all file to your runtime's `pack/**/start` directory, like:
`git clone [email protected]:Eliot00/git-lens.vim.git ~/.vim/pack/plugins/start`
### vim-plug
1. Add the following line to your `~/.vimrc`:
```vim
call plug#begin()
...
Plug 'Eliot00/git-lens.vim'
...
call plug#end()
```2. 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:
```vim
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](https://github.com/gitkraken/vscode-gitlens) and [blamer.nvim](https://github.com/APZelos/blamer.nvim).