kristijanhusak / vim-packager

Vim plugin manager that utilizes "jobs" and "pack" features.
MIT License
245 stars 9 forks source link

Disable default mappings #25

Closed Shatur closed 4 years ago

Shatur commented 4 years ago

Could add an option to disable default mappings?

kristijanhusak commented 4 years ago

@Shatur95 If you add your own, nothing will be set. For example, If you add this to your vimrc:

autocmd FileType packager nmap <buffer> <C-h> <Plug>(PackagerGotoNextPlugin)

Go to next plugin mapping which is by default <C-j> won't be mapped.

Shatur commented 4 years ago

Can I remove mapping in this way? For example, I do not need <Plug>(PackagerQuit) because I have universal shortcut <C-q> to close buffer.

kristijanhusak commented 4 years ago

do you use q for something else?

Shatur commented 4 years ago

I use <C-q>. Because of this I would like to have the ability to remove <Plug>(PackagerQuit). The most simple way - just remove all mappings and map only needed.

Shatur commented 4 years ago

Most of the plugins have something like g:packager#disable_default_mappings. For example, fern.vim, vim-swap.

kristijanhusak commented 4 years ago

I added it as an option to init. So when calling packager#init, do it like this:

  call packager#init({ 'disable_default_mappings': 1 })
Shatur commented 4 years ago

Thank you a lot!

Could you remove the following text in status window in this case? изображение

kristijanhusak commented 4 years ago

I don't see a reason. You know that you disabled the mappings and that they will not work.

Shatur commented 4 years ago

Maybe just add an option to disable this label? Something like NERDTreeMinimalUI?

kristijanhusak commented 4 years ago

I can add it, i'm just trying to understand why it bothers you? I'm spending maybe like max 1 min in the packager window, not looking at it all the time.

Shatur commented 4 years ago

I just suggested because it displays wrong mappings even if I leave defaults and remap one of the displayed mappings. It just a little confusing :) I'd removed it. Of course, it's not important at all. I think that the issue can be closed. Thanks again!