dhruvasagar / vim-dotoo

Org-mode like task logging & time tracking in Vim
558 stars 27 forks source link

custom capture templates not being read on first run #140

Closed cherryramatisdev closed 1 year ago

cherryramatisdev commented 1 year ago

When i first open vim and press gC to toggle capture menu, the items presented are all the defaults but if I source my vimrc it begin to read my custom templates on gC

https://asciinema.org/a/597464

Let me know if I can provide any informations

dhruvasagar commented 1 year ago

@cherryramatisdev Thanks for letting me know, i'll look into it and get back to you.

cherryramatisdev commented 1 year ago

Thanks a lot!

cherryramatisdev commented 1 year ago

Update for more context: My modified journal template works on the first run, but it shows templates that doen't exists

maybe it's a initialization variable problem

dhruvasagar commented 1 year ago

@cherryramatisdev Sorry for taking this long, but let me explain what's going on. For convenience of the end-user, the capture templates configuration are designed in a way to allow you to define / override existing configuration provided natively by vim-dotoo. This is to say, it merges your configurations with the defaults provided and shows all available accordingly. Hope that clarifies what's going on. So, in your case, you should just add the templates that you want to add / override and the other existing ones shall remain. As of now there isn't a way to remove templates.

dhruvasagar commented 1 year ago

@cherryramatisdev I have pushed a new update that allows you to remove existing templates too. Kindly check :h g:dotoo#capture#templates for more details

cherryramatisdev commented 1 year ago

Incredible feature! Thanks for explaining and for the new feature

I'll update my setup and try it out