LaTeX-Box-Team / LaTeX-Box

Lightweight Toolbox for LaTeX - New Official repository
http://www.vim.org/scripts/script.php?script_id=3109
GNU General Public License v3.0
396 stars 66 forks source link

Always autojump to certain line of file after "make" #127

Open unboundval opened 11 years ago

unboundval commented 11 years ago

Hi,

I noticed a strange behavior that when I type ":silent make" from within vim, the tex source is scrolled back to the a certain line, which I don't know why. I tried to insert a few blank lines above that line, but the cursor still goes back to the same line (different line number, but same line of text).

I think this might be caused by latex-box because it goes away after I disabling latex-box plugin. It persists even when I set LatexBox_autojump=0. Do you have any idea about this issue? Thank you!

My related settings are as followings,

    Bundle 'LaTeX-Box-Team/LaTeX-Box'
    let g:LatexBox_split_resize=1
    let g:LatexBox_autojump=0
    setlocal omnifunc=LatexBox_Complete
    nnoremap <silent> <F3> :LatexTOCToggle<CR> 
lervag commented 11 years ago

Strange, I am not able to reproduce. What is your &makeprg (you can find this with :set makeprg or echo &makeprg).

PS! You should not have to set the omnifunc manually, it is already set in LaTeX-Box.

unboundval commented 11 years ago
:set makeprg

makeprg=make

Also, removing

    setlocal omnifunc=LatexBox_Complete

doesn't help.

I am currently busy working on my writing so I disabled it for the time being. I will try to get a minimal vim configuration to reproduce the behavior when I have time. Thanks.

lervag commented 11 years ago

Sorry, I didn't mean that it should help to remove setlocal ...Complete, only that it is set by default and that you should not need to have it in your vimrc file.

If you would be able to supply a minimal vim configuration and a tex-file and makefile that reproduce the bug, I would be happy to look into it.

GreekOCR commented 9 years ago

I have recently installed LaTeX-Box and am experiencing the same issue. I'm running vim 7.4.793, LaTeX Box master branch, commit a140249caa79c35c09f4dca3201e1189b3721da3

lervag commented 9 years ago

@GreekOCR A couple of questions:

  1. Why do you want/need to use make? Why not simply use the :LatexmkCompile command?
  2. What is your makepgr option set to?

Also: Please provide a full example of how to replicate.

GreekOCR commented 9 years ago

Hmm, makepgr is indeed set to make. Should LaTeX-Box not have set this (at least when working with a .tex file) to use latexmkCompile? This would seem to be the issue. I can confirm I have latexmk with my tex distribution.

To reproduce, I can create a fresh .vim and .vimrc, install pathogen, add the minimal execute pathogen#infect() filetype plugin indent on for pathogen and then install LaTeX-Box with the standard git clone to .vim/bundle. Then open a .tex file, create an error in it, save the buffer, and use \ll to compile. The behavior is the same with my normal environment, but naturally this is a cleaner reproduction.

lervag commented 9 years ago

Hi again. LaTeX-Box does not use make or makeprg for anything.

Could you please elaborate on your minimal example, in particular: What do you expect to happen after you press \ll?

If I understand correctly, you do not set any options for LaTeX-Box, and so all options are default values. Correct?

GreekOCR commented 9 years ago

Yes, your understanding is correct. I was under the impression that LaTeX-Box would map \ll to invoke latexmk when it (LaTeX-Box) was installed. If this is not the case, what is the correct way to configure LaTeX-Box?

lervag commented 9 years ago

Yes, LaTeX-Box maps <leader>ll to invoke the command LatexmkCompile, which in turn starts latexmk. There are several options that control how LaTeX-Box calls latexmk, please read the documentation, see :h latex-box-settings-compilation.

I would in general suggest that you skim or read all of the docs, see :h latex-box.txt.