Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration with vimwiki #49

Closed
lervag opened this issue Aug 4, 2014 · 6 comments
Closed

Integration with vimwiki #49

lervag opened this issue Aug 4, 2014 · 6 comments

Comments

@lervag
Copy link

lervag commented Aug 4, 2014

I just recently noticed your calendar plugin, and I am impressed. It looks amazing!

However, there is one major feature that I miss, and that is implemented in Matsumotos calendar plugin: A calendar action hook. This hook is used by vimwiki to let the function vimwiki#diary#calendar_action open the current chosen date with <cr>.

@itchyny
Copy link
Owner

itchyny commented Aug 4, 2014

I do not know what vimwiki is but I think that you can achieve by the following configuration:

autocmd FileType calendar nmap <buffer> <CR> :<C-u>call vimwiki#diary#calendar_action(b:calendar.day().get_day(), b:calendar.day().get_month(), b:calendar.day().get_year(), b:calendar.day().week(), "V")<CR>

@lervag
Copy link
Author

lervag commented Aug 5, 2014

Thanks, that works. I also noticed one more thing, but that might be too much to ask: Matsumotos calendar also adds a hook that allows to add a prefix or suffix to a date entry. This is used by vimwiki to add a star infront of dates that have diary entries.

This is not a big deal, but it is very convenient.

Here is vimwikis hook. Here is how the hook is connected to the calendar. Finally, here and here is how the sign is applied.

@lervag
Copy link
Author

lervag commented Aug 5, 2014

Note: The important thing here is to mark calendar date. It need not be through a prefix or suffix, it could also be through syntax highlighting. That might indeed be even better.

@itchyny
Copy link
Owner

itchyny commented Aug 5, 2014

In the first stage of developing this plugin, I was to implement that kind of interface to interact with other plugins. However, I got less interested because it seems that this plugin itself is useful enough. I use this plugin as diary, by writing what was on as a new event everyday. Wiki, like vimwiki, can be dealt inside this plugin, I have not tried that plugin though.

@lervag
Copy link
Author

lervag commented Aug 5, 2014

vimwiki is much more than just a diary, and a very useful plugin. If you have not tried it, I suggest you look at it.

However, I respect your choice in this matter. I'm happy now that the mapping works. I would of course be very happy if you would reconsider.

@thorlucas
Copy link

Has there been any update regarding this matter? I would love to be able to mark a day that has a diary entry.

@rddunphy rddunphy mentioned this issue Oct 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants