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

Autocommand nesting too deep issue #37

Open
Jef-coder opened this issue Mar 26, 2021 · 0 comments
Open

Autocommand nesting too deep issue #37

Jef-coder opened this issue Mar 26, 2021 · 0 comments

Comments

@Jef-coder
Copy link

I just downloaded and started using this plugin today. This is a pretty slick plugin, and I think I'll be getting a lot of use out of it, so thanks!

When I started using this plugin, I would get this annoying warning that Autocommands were nested too deep. It doesn't seem to cause a major issues, but it drives OCD people like me crazy :)

Looking through the plugin, I can see where you set an auto command for "FileType todo" to call the VimTodoListsInit function. In the VimTodoListsInit function the first line issues a "set filetype=todo", creating the infinite loop that triggers the autocommand nesting error.

I fixed this in my local plugin with a quick and dirty hack (probably not the best way to do it, but it works for me) by:

  1. Rename the VimTodoListsInit function to VimTodoListsPostInit
  2. Delete the "set filetype=todo" from the VimTodoListPostsInit function
  3. Create a new function named VimTodoListsInit that ONLY sets filetype=todo
  4. Change the "autocmd FileType todo call VimTodoListsInit" to call VimTodoListsPostInit

I'm sure there is a better way to fix this, but please find my work around attached.
vim-todo-lists.txt

Jef-coder pushed a commit to Jef-coder/vim-todo-lists that referenced this issue Apr 8, 2021
Closes aserebryakov#37, Closes aserebryakov#38
Correct the issue with the autocommand infinite loop.  Smart indent
breaks the indenting, setlocal nosi.  Added the option to have a date
appended when an item is complete (let g:VimTodoListsDateCompleteEnable
= 1 in .vimrc).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant