Skip to content

Autocommand nesting too deep issue #37

Open
@Jef-coder

Description

@Jef-coder

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions