itchyny / calendar.vim

A calendar application for Vim
MIT License
1.97k stars 73 forks source link

Allow customization of normal mode mappings #72

Closed mMontu closed 9 years ago

mMontu commented 9 years ago

I think it can be useful to allow the user to add/remove mappings to the calendar window.

It can be useful if the plugin mappings clashes with some user mappings. For example, I use the plugin mainly on small windows

nmap <silent> <Leader>cal :Calendar -view=year -split=vertical
         \ -position=topleft -width=27<CR>
nmap <silent> <Leader>caL :Calendar -view=year -split=horizontal
         \ -position=below -height=12<CR>

While it works fine when I check something and just close the calendar window, I can't use some mappings for window (Ctrl-[hjkl]) and tab page navigation (Ctrl-[np]).

itchyny commented 9 years ago

I think user can already configure the mappings freely. See :h calendar-problem-4.

mMontu commented 9 years ago

Thanks for the speedy answer. Indeed, that approach is far better.

My only regret is that I spent some time writing this alternative solution. Before starting it I checked :h calendar-key-mappings, then I searched for mappings on that file. Maybe a reference for calendar-problem-4 could be added at the end of the key mappings section to help someone else searching for that information.

itchyny commented 9 years ago

Sorry for that. Thank you for your suggestion. I'll add the link later. I think that I should improve that section with some examples.