-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Displaying the results of a LaTeX run at the time? #537
Comments
I don't quite understand what you mean. Do you mean you want to see the output of |
Yes, I want to see basically the terminal output of |
I also think that what @amca01 proposes would be a useful option. |
@amca01 wrote:
You don't see the message |
@amca01 I think @nasenatmer has a good question, although partly unrelated to your request. The point is that it may seem like you are working with vimtex without the callback feature, which would provide feedback to your Vim session when each compilation is finished. Thanks for adding your vote, @heiderich. I'll see what I can do about the asked feature. I can at least add an option to open the output buffer automatically. Having the buffer automatically updating is more difficult, perhaps not even possible. But I'll see what I can do. |
Ok, I've done part of this now. If you open the output buffer and return to the tex buffer, the output buffer should now update in a more streamlined manner. If the callback is active, it will update the output buffer directly. Else there are several autocmds that update the buffer. It is sort of hackish, but it seems to work pretty well (especially with the callbacks). It remains to add an option to automatically open the output buffer after compilation has started. I would still appreciate feedback on the updated output buffer. |
Ok, I've now added events that should solve this for you. You can add this to your vimrc file: augroup MyVimtex
au!
autocmd User VimtexEventCompileStarted call vimtex#latexmk#output()
augroup END This will open the output window when compilation has started. You can customize this further, e.g. return the cursor to the previous window/split by appending I think this approach is good, since it allows anyone to customize things to their own preferences. |
Without any changes to my .vimrc I recently experience sometimes the following: After compilation starts, a new window with the output of latexmk opens and gets the focus. Even though I supported this feature request earlier, I consider this behavior a bit annoying. Can I turn this off? I would consider it more useful if
|
This is strange. Are you sure you are on the most recent version of vimtex? The output window should not open unless you add the autocommand that I suggested to your vimrc file. If you did, then I already explained that the autocommand was a simple suggestion that you can further enhance to get the desired behaviour. For instance, to also keep the focus in the TeX buffer, you can do: augroup MyVimtex
au!
autocmd User VimtexEventCompileStarted
\ call vimtex#latexmk#output()
\ | wincmd w
augroup END This will open the output buffer and then return the cursor to the TeX buffer when compilation starts. The point of all of this is that the autocommand allows you to have full control. You could create a function that sets both the position, size and everything. The following is an example that I think just might work. augroup MyVimtex
au!
autocmd User VimtexEventCompileStarted call MyVimtexOutputter()
augroup END
function! MyVimtexOutputter()
call vimtex#latexmk#output()
" Move window to bottom
wincmd J
" Set window height
resize 20
" Return to LaTeX buffer
wincmd w
endfunction |
Yes, I was on the latest vimtex version. But: I actually did add the autocommand you proposed to my vimrc and then it seems that I totally forgot about it. I am so sorry! Your modified version of the autocommand takes into account my first and third concern. I guess it would be difficult to implement a solution for the second, right? |
Yes, the second is more difficult. However, if you have callbacks enabled, then the output window should update whenever a compilation is completed and issues a callback. Thus, it is not near perfect, but it should be better than nothing. |
When I open up a new file, and run LaTeX (well, more properly latexmk) on it with
\ll
, is there any way I can check on the results of the compilation? What I'd want is either a pop-up window, or an automatic split of the vim window, one part of which would show the running compilation. My LaTeX workflow has generally involved my checking on a compile run, so that I can easily check for errors. I know I can check afterwards with\lo
, but can I watch a compile in real time?The text was updated successfully, but these errors were encountered: