Skip to content

senkentarou/gobf.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gobf.nvim

  • Git open blob file (gobf) plugin for neovim.

Installation

Plug 'senkentarou/gobf.nvim'

Setup

  • Please set your nvim confg before use.
require('gobf').setup {}
  • For customizing, please setup as below,
require('gobf').setup {
  default_remote = 'upstream',
  default_branch = 'main',
  possible_branches = {
    'main',
    'master',
    'develop'
  }
}

Usage

  • Please execute :Gobf command on target line, then github blob page is opened following commit hash on your web browser.
  • You could set your git remote as an argument like :Gobf upstream
  • You could select lines and execute <CMD>Gobf on visual mode.

Example keymappings

" open blob file on github.com
nnoremap <silent> <Leader>o :<C-u>Gobf<CR>
" open blob file with visual selected lines on github.com
vnoremap <silent> <Leader>o <CMD>Gobf<CR>
" open blob file as current remote revision on github.com
nnoremap <silent> <Leader>O :<C-u>Gobfop<CR>
" open blob file as current remote revision with visual selected lines on github.com
vnoremap <silent> <Leader>O <CMD>Gobfop<CR>

For development

  • Load under development plugin files on root repository.
    • (If you already installed this plugin thankfully, please comment out applying code before.)
nvim --cmd "set rtp+=."

License

  • MIT

About

Git open blob file (gobf) plugin for neovim.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published