I had problem with YCMD server not shutting down properly, so I tried to kill it on VimLeave. After a couple tries I detected that VimLeave/VimLeavePre event not firing on vim exit. VimEnter is working though. What could be the cause of this?
Asked
Active
Viewed 867 times
4
VimLeaveandVimLeavePreare not triggered? – Sato Katsura Jul 20 '16 at 15:21autocmd VimLeave * :!touch ~/hiVimLeave- nothing andautocmd VimEnter * :!touch ~/hiVimEnter- file created – fourslashw Jul 20 '16 at 15:25autocmd VimLeave * call writefile([v:dying], '/tmp/some_file', 'a'). Don't expectwritefile()to resolve~and the like. – Sato Katsura Jul 20 '16 at 15:30autocmd VimLeave * call writefile([v:dying], '/home/user/some_file', 'a')and its not working – fourslashw Jul 20 '16 at 15:34VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 31 2015 23:35:24) Included patches: 1-488, 576 Modified by pkg-vim-maintainers@lists.alioth.debian.org Compiled by jamessan@debian.org– fourslashw Jul 20 '16 at 15:37VimLeaveauto command defined somewhere, which will take precedence; futher ones won't be executed.:au vimleaveto see what's already defined. Tryau! vimleavebefore defining your autocommand to delete any existing ones. – Antony Jul 20 '16 at 16:17