Re: [cream] Any way to trigger event after all addons loaded?
Cream is a free, easy-to-use configuration of the Vim text editor
Brought to you by:
digitect
From: Steve H. <dig...@da...> - 2007-08-22 03:43:49
|
On Tue, 2007-08-21 at 11:33 -0300, Ben Armstrong wrote: > > I implemented a "-r" read-only switch in my Cream wrapper to call > Cream_file_open_readonly() instead of Cream_file_open() on the > specified file. Unfortunately, the filetype isn't detected properly > so although the file is opened readonly, there is no syntax > highlighting. I guess the addons haven't been all loaded yet when > cream-user.vim is loaded. They've been loaded, but after all the file loads, THEN all the autocmds fire. > Is there some (autocmd?) hook I can use to defer the open until > after all addons have loaded? Try calling Cream_filetype() at the end, it should set the detection and syntax highlighting. Better yet, tack on an autocmd to do it for you: function! MyRefresh() call Cream_filetype() endfunction autocmd VimEnter * call MyRefresh() Tack on the BufEnter event if that fails. -- Steve Hall [ digitect dancingpaper com ] :: Cream... usability for Vim :: http://cream.sourceforge.net |