Skip to content

multiple autocmd #155

@go2chenhua

Description

@go2chenhua
- [x ] neovim

NVIM v0.3.0-1201-g8ce639304

- [x ] Windows 7

do:

:LeaderfBufTag
:LeaderfFunction

multi time

:au BufWipeout

--- Auto-Commands ---
BufWipeout
* call leaderf#BufTag#removeCache(expand(''))
call leaderf#BufTag#removeCache(expand(''))
call leaderf#Function#removeCache(expand(''))
call leaderf#Function#removeCache(expand(''))
call leaderf#BufTag#removeCache(expand(''))
call leaderf#BufTag#removeCache(expand(''))

and

VimLeave
* call GuiClose()
call leaderf#BufTag#cleanup()
call leaderf#BufTag#cleanup()
call leaderf#Function#cleanup()
...
call leaderf#Function#cleanup()
call leaderf#Function#cleanup()j

in python code

def _defineMaps(self):
    lfCmd("call leaderf#Function#Maps()")
    lfCmd("autocmd BufWipeout * call leaderf#Function#removeCache(expand('<abuf>'))")
    lfCmd("autocmd VimLeave * call leaderf#Function#cleanup()")

changed code

def _defineMaps(self):
    lfCmd("call leaderf#Function#Maps()")
    lfCmd("augroup LFGRP")
    lfCmd("autocmd!")
    lfCmd("autocmd BufWipeout * call leaderf#Function#removeCache(expand('<abuf>'))")
    lfCmd("autocmd VimLeave * call leaderf#Function#cleanup()")
    lfCmd("augroup END")

do:
LeaderfBufTag
LeaderfFunction

multi time:

:au BufWipeout

--- Auto-Commands ---
BufWipeout
* call leaderf#BufTag#removeCache(expand(''))
call leaderf#BufTag#removeCache(expand(''))
LFGRP BufWipeout
* call leaderf#Function#removeCache(expand(''))

BUT:

when nvim quit, still slow,

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions