gregsexton / gitv

gitk for Vim.
938 stars 59 forks source link

Add Plug for ctrl mappings #81

Closed idbrii closed 9 years ago

idbrii commented 10 years ago

17f084a53082be7b261be5a7cf97c95c36622bfe prevented me from using the Ctrl-p/n maps that I like, so I made them Plug mappings that can be defined in a user's ~/.vim/after/ftplugin/gitv.vim

Also updated the modeline to match your whitespace settings and fixed a few indentation lines that didn't match the rest of the file. (I left the fugitive lines alone since they're copied straight from fugitive.)

gregsexton commented 9 years ago

Thanks for the whitespace fixes.

My vim knowledge is rotting, I'm afraid. Remind me, what does do again? How will this affect current users?

idbrii commented 9 years ago

Whitespace: The modeline will ensure that other contributors' vim uses the same whitespace settings as you when editing gitv.

Ctrl Mappings: gitv maps the Ctrl key, but some people (probably me) don't like that, so there's Gitv_DoNotMapCtrlKey. Previously, it would map Ctrl-p, but 17f084a made the code fully obey the setting's name. In order for me to use Ctrl-p, gitv needs to provide an interface for that mapping. This Plug change will allow users to provide their own remappings for any of the Ctrl maps. The change will be invisible to end users unless they want to map the ctrl commands -- now it's possible by creating ~/.vim/after/ftplugin/gitv.vim with this:

nmap <buffer> <silent> <C-p> <Plug>(gitv-next-commit)