Thread: [Vim-latex-devel] text clobbered in vim (but not gvim)
Brought to you by:
srinathava,
tmaas
From: Stephen W. <sw...@gm...> - 2007-11-18 23:14:43
|
Hello everyone, I normally use gvim with vim-latex, but I recently I tried vim (i.e. without the GUI), and when compiling with \ll or opening the viewer with \lv, messages from the external programs clobber the text in the vim window. For instance when compiling, I get: This is BibTeX, Version 0.99c (Web2C 7.5.4) The top-level auxiliary file: test.aux The style file: plain.bst Database file #1: test.bib at the bottom of the Vim window, and the text in the buffer "disappears"... it's still there and I can move the cursor over it, but it's invisible. If I use :redraw! all is well again (or else if I change buffer, or split the window, or invoke help, any of these probably cause redraw to be called and make the text reappear). Does anyone else have this problem? Can anyone suggest how I can make the redraw automatic? I thought of adding :redraw! at the end of the Tex_RunLaTeX and Tex_ViewLaTeX functions in ftplugin/latex-suite/compiler.vim but I would prefer not to edit the vim-latex files (as I'll lose changes at the next upgrade). Any suggestions welcome! Thanks, Steve |
From: Martin S. <fo...@un...> - 2007-11-19 06:57:16
|
Hey, this annoyed me to (a lot). I don't remember that this has always been like this, maybe it has been introduced by vim 7.1. Anyways, my workaround was using gvim, but now you got me motivated to search for a real solution, and I found it: $ tail -2 .vim/after/ftplugin/tex.vim "refresh after compiling.. :nnoremap <buffer> <Plug>Tex_Compile :call Tex_RunLaTeX()\|redraw!<cr> (I found that in latex-suite/compiler.vim:796). A caveat is that you won't see the "compiled latex <n> times" message. Bye Martin On Sun, Nov 18, 2007 at 11:14:43PM +0000, Stephen Wilkinson wrote: > Hello everyone, > > I normally use gvim with vim-latex, but I recently I tried vim (i.e. > without the GUI), and when compiling with \ll or opening the viewer > with \lv, messages from the external programs clobber the text in the > vim window. > > For instance when compiling, I get: > This is BibTeX, Version 0.99c (Web2C 7.5.4) > The top-level auxiliary file: test.aux > The style file: plain.bst > Database file #1: test.bib > > at the bottom of the Vim window, and the text in the buffer > "disappears"... it's still there and I can move the cursor over it, > but it's invisible. If I use :redraw! all is well again (or else if I > change buffer, or split the window, or invoke help, any of these > probably cause redraw to be called and make the text reappear). > > Does anyone else have this problem? Can anyone suggest how I can make > the redraw automatic? I thought of adding :redraw! at the end of the > Tex_RunLaTeX and Tex_ViewLaTeX functions in > ftplugin/latex-suite/compiler.vim but I would prefer not to edit the > vim-latex files (as I'll lose changes at the next upgrade). > > Any suggestions welcome! > Thanks, Steve |
From: Stephen W. <sw...@gm...> - 2007-11-20 13:29:39
|
Hi Martin and Mirko, Thank you both for your replies - glad to see I'm not alone with this problem! Martin, thanks for your suggestion which works for me. I've updated my .vim/after/ftplugin/tex.vim file with the following (I don't know how to test for "if not" so I've put the statement in the "else" part): if has("gui_running") else :nnoremap <buffer> <Plug>Tex_Compile :call Tex_RunLaTeX()\|redraw!<cr> endif Martin, I saw your reply to the thread "output of xdvi shows in tex file" - and thought maybe the same trick would apply. I get the same problem with xdvi writing its output into my tex file, so I tried this: :nnoremap <buffer> <Plug>Tex_Compile :call Tex_ViewLaTeX()\|redraw!<cr> ** but it doesn't work, and I'm not sure why. Any suggestions? Thanks for your help, Steve On 19/11/2007, Martin Sander <fo...@un...> wrote: > > Hey, this annoyed me to (a lot). I don't remember that this has always > been like this, maybe it has been introduced by vim 7.1. > Anyways, my workaround was using gvim, but now you got me motivated to > search for a real solution, and I found it: > > $ tail -2 .vim/after/ftplugin/tex.vim > "refresh after compiling.. > :nnoremap <buffer> <Plug>Tex_Compile :call > Tex_RunLaTeX()\|redraw!<cr> > > (I found that in latex-suite/compiler.vim:796). > A caveat is that you won't see the "compiled latex <n> times" message. > > Bye > > Martin > > On Sun, Nov 18, 2007 at 11:14:43PM +0000, Stephen Wilkinson wrote: > > Hello everyone, > > > > I normally use gvim with vim-latex, but I recently I tried vim (i.e. > > without the GUI), and when compiling with \ll or opening the viewer > > with \lv, messages from the external programs clobber the text in the > > vim window. > > > > For instance when compiling, I get: > > This is BibTeX, Version 0.99c (Web2C 7.5.4) > > The top-level auxiliary file: test.aux > > The style file: plain.bst > > Database file #1: test.bib > > > > at the bottom of the Vim window, and the text in the buffer > > "disappears"... it's still there and I can move the cursor over it, > > but it's invisible. If I use :redraw! all is well again (or else if I > > change buffer, or split the window, or invoke help, any of these > > probably cause redraw to be called and make the text reappear). > > > > Does anyone else have this problem? Can anyone suggest how I can make > > the redraw automatic? I thought of adding :redraw! at the end of the > > Tex_RunLaTeX and Tex_ViewLaTeX functions in > > ftplugin/latex-suite/compiler.vim but I would prefer not to edit the > > vim-latex files (as I'll lose changes at the next upgrade). > > > > Any suggestions welcome! > > Thanks, Steve > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Vim-latex-devel mailing list > Vim...@li... > https://lists.sourceforge.net/lists/listinfo/vim-latex-devel > |
From: Martin S. <fo...@un...> - 2007-11-20 14:02:52
|
On Tue, Nov 20, 2007 at 01:29:41PM +0000, Stephen Wilkinson wrote: > I don't know how to > test for "if not" so I've put the statement in > the "else" part if !has("gui_running") :nnoremap <buffer> <Plug>Tex_Compile :call Tex_RunLaTeX()\|redraw!<cr><cr> endif by the way, I added another <cr> to the end of the line because I got one of these annoying "Press ENTER or type command to continue"-prompts.. > Martin, I saw your reply to the thread "output of xdvi shows in tex file" - > and thought maybe the same trick would apply. I get the same problem with > xdvi writing its output into my tex file Well, I guess you have seen the xdvi.hushStdout: true Setting for .Xdefaults already. If xdvi still writes to stderr, you could try $ alias xdvi="xdvi 2>/dev/null" This should work as $ xdvi 2>/dev/null somefilethatisnotdvi does not print anything (while it does without redirection). You are on a *nix system, aren't you? > Thanks for your help, You're welcome. I have profited so much from the FLOSS community that I am glad I can help some other people myself. Good for my Karma (not that I am a Buddhist, rather a fan of "My Name is Earl"). Martin |
From: Stephen W. <sw...@gm...> - 2007-11-27 22:24:32
|
Thanks a lot Mirko. kdvi is very nice, and works out of the box with gvim for forward and backward search after inserting the -src-specials in Tex_CompileRule_dvi But you saved my a lot of head scratching to make backward search work with vim so thanks (I guess if you don't start vim with --servername KDVI, there's no one listening for backward searches?) BTW, I meant to send my last few messages to the list, but I think they only went to you... so I'm CC'ing this one to the list as it will surely help others. Thanks again, Steve On 27/11/2007, Mirko Hessel-von Molo <mi...@ma...> wrote: > On Mon, 26 Nov 2007, Stephen Wilkinson wrote: > > >> Well kdvi reads source-specials. I got to work forward and backward search > >> with it. If you're interested I can let you know how. > > Yes please! That would save me a lot of time and aggravation! I've > > just installed kdvi and finally I can scroll continuously between > > pages! > > So it seems you already have kdvi as your default viewer for \lv (and \ls). > Forward search should work with kdvi as soon as you enable the > src-specials. To do that, put > > TexLet g:Tex_CompileRule_dvi = 'latex -src-specials -interaction=nonstopmode $*' > > into .vim/ftplugin/tex/texrc. This brings you to the right place in your > dvi document when you issue \ls. > > For inverse search you need to tell kdvi which editor to call upon middle > mouse button click. You do that in (my kdvi menus are in German, so I guess > the English names) Options -> Preferences -> DVI Specials -> Editor for > inverse search. Choose Custom editor and enter > > vim --servername KDVI --remote-silent +%l %f > > as custom command. This assumes that you started your vim using > > vim --servername KDVI filename.tex > > (Alternatively gvim, it just works the same.) You are free to choose a > different servername, of course, only make sure its the same in both > commands. > > Maybe I forgot something. If so, tell me ;-) > > Yours, Mirko > > > |