Re: [Vim-latex-devel] What to do about removed files?
Brought to you by:
srinathava,
tmaas
From: Alan S. <ala...@po...> - 2004-03-11 07:33:33
|
* Srinath Avadhanula (sr...@fa...) wrote: > I thought of something which looks even better :) >=20 > Suppose ftplugin/tex/texviewer.vim is a placeholder file kept there to > overwrite the previous version. Then make a new > ftplugin/tex/texviewer.vim which contains something like this: >=20 > ---- start ftplugin/tex/texviewer.vim ----- >=20 > if g:Tex_DontRemoveTempFiles > finish > endif > augroup TexRemoveTempFiles > au VimLeave * :silent! call delete(expand('<sfile>:p')) > augroup END >=20 > ---- end ftplugin/tex/texviewer.vim ----- >=20 > This essentially means that ftplugin/tex/texviewer.vim essentially > removes itself (suicide?) when latex-suite first runs and then the user > exits. This means no more code addition in main.vim... >=20 > The initial "if g:Tex_DontRemoveTempFiles" is just so I can set > g:Tex_DontRemoveTempFiles to ensure that the file doesn't keep > dissapearing from my hard-disk when I do testing. >=20 > I think I'll use this strategy. If this works, this is really neat ;-) (and I'll keep that in my list of nice little vim hacks) Alan --=20 The hacker: someone who figured things out and made something cool happen. =2EO. =2E.O OOO |