How does Latex-Box determine whether it gets active or not when starting to edit a file?

Asked by Jakob

Hello,

I’m quite new to latex-box and am quite impressed with its simplicity.

However, I’ve not yet understood on which basis latex-box or rather vim decides whether it activates latex-box when a new file is opened with vim.

The reason is the following:

If I open my master file, latex-box is active alright.

But if I open (vim --servername vim body.tex) an \input file (which currently only has one \section{heading} and 3 lines of text), latex-box is not active! I cannot use my normal keys to compile the document.

Previously, I thought the file extension is the main clue but that doesn’t seem so.

Best,

Jakob

edit: Ok, it seems I’ve changed something somewhere because my ~/.vim/ftplugins/tex.vim doesn’t get sourced as well when opening body.tex; it still does when I open my master file. Well well, I’ll hope to find out soon what I did wrong and will report it here…

Question information

Language:
English Edit question
Status:
Solved
For:
Vim LaTeX Box Edit question
Assignee:
No assignee Edit question
Solved by:
Jakob
Solved:
Last query:
Last reply:
Revision history for this message
Jakob (hellwoofa) said :
#1

Ok, I don’t know what it was that suddenly disabled correct filetype detection of vim, but I helped it back via setting the following in ~/.vim/filetype.vim:
augroup filetypedetect
autocmd BufNewFile,BufRead *.wiki setf wikipedia
autocmd BufNewFile,BufRead *.tex setf tex
augroup END

I hope vim’s not disabled now considering detection of other filetypes…