Giter Site home page Giter Site logo

liquidz / tig-explorer.vim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iberianpig/tig-explorer.vim

0.0 2.0 0.0 28 KB

Vim plugin to use Tig as a git client. Seamless switching between vim and Tig with opening in the same buffer.

License: MIT License

Vim Script 91.79% Shell 8.21%

tig-explorer.vim's Introduction

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

https://gyazo.com/181fef546cced7ca6dc651dff59cd1bf

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

Available Command

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
Customize Keymap on Tig

Following keymap is defined as defaut

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>'

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>

Support

Patreon

tig-explorer.vim's People

Contributors

iberianpig avatar liquidz avatar maxigit avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.