lambdalisue / vim-gina

👣 Asynchronously control git repositories in Neovim/Vim 8
http://www.vim.org/scripts/script.php?script_id=5531
MIT License
689 stars 27 forks source link

Gina status: jump to next/previous item #219

Closed AndreGeng closed 5 years ago

AndreGeng commented 5 years ago

within Gina status buffer, is there a way to jump to next/previous item, like Ctrl-n/Ctrl-p works within :Gstatus buffer in fugitive.vim

olmokramer commented 5 years ago

You can use Vim's builtin [c and ]c.

AndreGeng commented 5 years ago

actually [c and ]c are not working for me. From my understanding these two shortcuts is using to jump between file changes. But they are not working in :Gina status view. What I am asking is jumping inside status view as following pic shows image quickly jump to the changed file item.

lambdalisue commented 5 years ago

Unfortunately there are no exact equivalent. But you can quickly check the difference or whatever with action & dot repeat like

:Gina status -s
a  <- Open action window
show:preview:top<CR>  <- Execute 'show:preview:top' action
j.  <- Repeat the previous action with next item
j.  <- ... and next
j.  <- ... and next

and if you desire, you can get similar behavior with the following (note that you must use :Gina status -s for below)

call gina#custom#mapping#nmap('status', '<C-n>', 'j<Plug>(gina-show-preview)')
call gina#custom#mapping#nmap('status', '<C-p>', 'k<Plug>(gina-show-preview)')
olmokramer commented 5 years ago

@AndreGeng Oh right, seems I misunderstood the question.

AndreGeng commented 5 years ago

@lambdalisue thanks for the reply, "Gina status -s" should works for me currently.