iberianpig / Tig Explorer.vim
Licence: mit
Vim plugin to use Tig as a git client. Seamless switching between vim and Tig with opening in the same buffer.
Stars: ✭ 136
Labels
Projects that are alternatives of or similar to Tig Explorer.vim
Vim Ruby Minitest
Vim highlighting & completion for MiniTest
Stars: ✭ 97 (-28.68%)
Mutual labels: vim-plugins
Dotfiles ikigai
dotfiles 🔥 includes scripts that makes my life easier!
Stars: ✭ 110 (-19.12%)
Mutual labels: vim-plugins
Omnisharp Vim
Vim omnicompletion (intellisense) and more for C#
Stars: ✭ 1,269 (+833.09%)
Mutual labels: vim-plugins
Vim Follow My Lead
Vim plugin for showing all your <Leader> mappings in a readable table including the descriptions.
Stars: ✭ 100 (-26.47%)
Mutual labels: vim-plugins
Vim Unbundle
🎁 Fast, filetype-lazy loader of Vim scripts & plugins
Stars: ✭ 97 (-28.68%)
Mutual labels: vim-plugins
Auto Git Diff
A vim plugin which shows git diff for Git Rebase Interactive
Stars: ✭ 88 (-35.29%)
Mutual labels: vim-plugins
Vim Search Pulse
Easily locate the cursor after a search
Stars: ✭ 91 (-33.09%)
Mutual labels: vim-plugins
Ale
Check syntax in Vim asynchronously and fix files, with Language Server Protocol (LSP) support
Stars: ✭ 11,380 (+8267.65%)
Mutual labels: vim-plugins
tig-explorer.vim
Vim plugin to use Tig as a git client.
- Seamless switching between Vim and Tig
- Adding buffer in the same process not a child of Tig process.
- Open files in tabs or in vertically / horizontal split windows on Vim from Tig
- Dynamically defining keymaps on Tig
- Support Vim8 / NeoVim terminal
- Open diff-mode side by side at the selected commit from Tig
Requirement
Installation
" vim-plug
Plug 'iberianpig/tig-explorer.vim'
" NeoBundle
NeoBundle 'iberianpig/tig-explorer.vim'
NOTE: If you use Neovim, you have to add the dependency to the plugin bclose.vim:
" vim-plug
Plug 'rbgrouleff/bclose.vim'
" NeoBundle
NeoBundle 'rbgrouleff/bclose.vim'
Usage
Keymap on Tig
Following commands are available on tig launched from tig-explorer
e, <Ctrl-o>: edit on existing tab
<Ctrl-t> : edit on new tab
<Ctrl-v> : edit with vsplit window
<Ctrl-s> : edit with split window
<ESC> o: open with commit on existing tab
<ESC> t: open with commit on new tab
<ESC> v: open with commit with vsplit window
<ESC> s: open with commit with split window
When a commit is available (in main, blame, tree, refs view) view, the version of the file corresponding to this commit will be open instead of the version in the working directory. Split versions will open the two buffer in diff mode.
Customize Keymap on Tig
Following keymap is defined as defaut
let g:tig_explorer_keymap_edit_e = 'e'
let g:tig_explorer_keymap_edit = '<C-o>'
let g:tig_explorer_keymap_tabedit = '<C-t>'
let g:tig_explorer_keymap_split = '<C-s>'
let g:tig_explorer_keymap_vsplit = '<C-v>'
let g:tig_explorer_keymap_commit_edit = '<ESC>o'
let g:tig_explorer_keymap_commit_tabedit = '<ESC>t'
let g:tig_explorer_keymap_commit_split = '<ESC>s'
let g:tig_explorer_keymap_commit_vsplit = '<ESC>v'
Keymap on Vim
Add following script to ~/.vimrc
" open tig with current file
nnoremap <Leader>T :TigOpenCurrentFile<CR>
" open tig with Project root path
nnoremap <Leader>t :TigOpenProjectRootDir<CR>
" open tig grep
nnoremap <Leader>g :TigGrep<CR>
" resume from last grep
nnoremap <Leader>r :TigGrepResume<CR>
" open tig grep with the selected word
vnoremap <Leader>g y:TigGrep<Space><C-R>"<CR>
" open tig grep with the word under the cursor
nnoremap <Leader>cg :<C-u>:TigGrep<Space><C-R><C-W><CR>
" open tig blame with current file
nnoremap <Leader>b :TigBlame<CR>
Other options
By default tig-explorer will use the builtin terminal if available. To force launching tig-explorer as shell command you can add the following to ~/.vimrc
" don't use builtin terminal
let g:tig_explorer_use_builtin_term=0
Support
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].