GithubHelp home page GithubHelp logo

vim-latex's Introduction

vim-latex aka latex-suite

This vim plugin provides a rich tool of features for editing latex files. For further descriptions, we refer to the website. There is also a user manual and a beginner's tutorial.

Installation

We recommend the installation via a plugin manager such as pathogen or Vundle.

Instructions for manual installation is documented at the website.

Recommended settings after installation can be found in Section 1 of the manual.

Documentation

As already mentioned, the manual can be found here. After installation, you will also have a rich in-vim documentation, see :help latex-suite.

vim-latex's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vim-latex's Issues

\cite completion: empty split window

Hello,

this is a follow-up to #83 in - once again - a special case.

Once again I'm using the IEEE bare_conf.tex template and now try to add a literature entry. With the current version the split window is empty. I pinpointed commit 5f2f5e8 to cause the problem. In this case I altered the template to not use the inline definition of the bibtex entry, but to use my bib file. See the following lines for the necessary changes to reproduce.

% can use a bibliography generated by BibTeX as a .bbl file
% BibTeX documentation can be easily obtained at:
% http://mirror.ctan.org/biblio/bibtex/contrib/doc/
% The IEEEtran BibTeX style support page is at:
% http://www.michaelshell.org/tex/ieeetran/bibtex/
\bibliographystyle{IEEEtran}
% argument is your BibTeX string definitions and bibliography database(s)
\bibliography{IEEEabrv,druidefix.bib}
%
% <OR> manually copy in the resultant .bbl file
% set second argument of \begin to the number of references
% (used to reserve space for the reference number labels box)
% \begin{thebibliography}{1}

% \bibitem{IEEEhowto:kopka}
% H.~Kopka and P.~W. Daly, \emph{A Guide to \LaTeX}, 3rd~ed.\hskip 1em plus
%   0.5em minus 0.4em\relax Harlow, England: Addison-Wesley, 1999.

% \end{thebibliography}

I seems like the change to return fnamemodify(retval, ':p') runs into a problem, when the command \bibliography{ has two filenames. If I either remove the IEEEabrv, or revert this commit everything works as expected.

Forward Search with generic viewer doesn't work

If the viewer set by g:Tex_ViewRule_pdf is a "generic" viewer (i.e., not one of the few that vim-latex knows how to handle), then vim-latex forgets to put actually put the viewer in the execution string.

Installation error

I'm seeing a function redefinition error after updating vim-latex using Vundle.

image

Normal mode key maping using langmap caries over to insert mode

When using langmap to remap keys in normal mode, when using latex plugin (installed using vundle) the mapping still occurs in insert mode.

From memory this doesn't happen on my home machine where I have root access and have installed using my package manager (pacman).

typing {} inserts <++> automatically.

Every time i write a { followed by a } without writing anything in between <++> gets inserted after the }

This is rather annoying...

How do i disable it or make it not break compilation after having installed the brackets plugin.

This breaks the compilation.

is there a way to disable smart backspace?

I recently have an issue when I am editing latex: the backspace sometime do not deletes character, simply moves cursor..

I checked the key is controlled by vim-latex's smart-backspace, therefore I want to disable it to see if the error occurs again.

Environment Mappings: document position detection flawed

Hello,

I must admit that I did not update my vim plugins for a very long time.

If I'm want to add a figure, I type 'figure' and then press <F5>. This automatically results in the correct environment as described in the manual. Unfortunately with the current version 7df30fe this doesn't work for me.

It seems like this has something to do with the detection of the current position I'm editing, because I'm getting a \usepackage{figure} code as mentioned in this question.

I pinpointed the commit 6870264 from @gerw to cause the problems. If I use the current commit and revert the changed made at this old commit everything works fine.

I did not fully understand what exactly causes the problem, because I only notice the error in the IEEE template bare_conf.tex. In other files the problem does not exist. Perhaps in the IEEE there are some special characters which fool the detection of the \begin{document}.

Cannot compile bibtext files with python enabled anymore

Hi guys!

Sometime ago, I started to have a problem with vim-latex. It is not compiling bibtex files when I execute \ll. It turns out that the problem was related with the call:

Tex_IsPresentInFile('\v\\bibdata|\\abx', mainFileName_root.'.aux')

If I change this line to:

Tex_IsPresentInFile('\\bibdata|\\abx', mainFileName_root.'.aux')

then everything starts to work. Another solution is to set:

let g:Tex_UsePython              = 0   

However, I do not like this option.

Can anyone help me to figure out what is wrong with the python function here?
/usr/bin/python in openSUSE is Python 2.7.10. I was trying to change the version to Python 3.4 but it seems that there is not an easy way to do that in vim-latex.

Regards,
Ronan

SumatraPDF: Forward Search not working properly

Fix: In ftplugin\latex-suite\compiler.vim on line 371 replace
let execString .= Tex_Stringformat('start %s "%s" -forward-search "%s" %s', viewer, target_file, mainfnameFull.".tex", linenr)
with
let execString .= Tex_Stringformat('start %s "%s" -forward-search "%s" %s', viewer, target_file, sourcefileFull, linenr)

Explanation:
mainfnameFull always represents the main latex file. However, if you are including additional latex files (e.g. using \input), you have to use the file name of the current latex file. Otherwise the PDF viewer will jump to the wrong position.

Furthermore, you might consider to change the if query elseif (viewer =~? "^sumatrapdf") on line 368. This won't work, if the user sets let g:Tex_ViewRule_pdf to a full path. Using something like elseif (viewer =~? "sumatrapdf") allows the usage of full paths for g:Tex_ViewRule_pdf, like e.g. let g:Tex_ViewRule_pdf = 'C:\MyApps\MiKTeX\bin\SumatraPDF.exe'.
However, it might be a good idea, if the query only matches Strings ending with either "sumatrapdf" or "sumatrapdf.exe".

VIM-LaTeX F5 package insertion problem

When I insert a package into my preamble in VIM-LaTeX using F5 and select for instance floatflt, instead of \usepackage{floatflt}, I often get the following. How can I solve this?

<++>]{floatflt}"`usepackage[X

Minimal working example:

\documentclass{article} 
[here is the cursor when I hit F5]

IMAP cannot override

I tried to override the original EFI map:

call IMAP('EFI', '\begin{figure}[<+htpb+>]\<CR>\centering<CR>\includegraphics[height=2in]{<+eps file+>}<CR>\caption{<+caption text+>}<CR>\label{fig:<+label+>}<CR>\end{figure}<++>', '')

which does not work...

`IMAP()` doesn't work if lhs contains `.`

I used the following command when editing a .tex file:

:call IMAP(',.','<++>','tex','phs','phe')

In insert mode, I typed ,..

What I expected:

  • The two characters would be replaced by <++>, cursor staying after.

What I got:

  • Just ,.

Then I tried other patterns like ,; instead of ,., which worked as expected as long as no . appears in the first argument of IMAP().

Behaviour of imap completion depends on the `backspace` setting

If the backspace setting does not include start, various imap completions do not work as expected.

To reproduce:

  • set backspace-=start
  • Type EDO

Expected result:

\documentclass[<+options+>]{<+class+>}

\begin{document}
<++>
\end{document}

Real result:

EDO\documentclass[<+options+>]{<+class+>}

\begin{document}
<++>
\end{document}

helptags error

When installing with dein I get errors like:

[dein] Error generating helptags:
[dein] Vim(helptags):E154: Duplicate tag "align" ...

(freely translated)

First I consider removing the offending "Align" plugin - but then the next popped up "tabular".
I managed to drill it down to the doc/latexhelp.txt file which creates many tags.
Since this file interferes with several plugins and I feel greater need to have help for actual vim plugins personally I decided to remove it.

automatically yank <++> to clipboard

when insert for example \frac{<+n+>}{<+d+>} the <+n+> is automatically selected and when I starts typing the <+n+> goes away, which is nice.

The problem is the <+n+> when deleted is copied to clipboard too, any way that I can configure this.

Vundle installation error

When I run PluginInstall on Vundle using MacVim 8.0.329 (127) on MacOSX 10.12.3 (16D32), I get the following error

Error detected while processing /Users/pmzda/.vim/bundle/LaTeX-Suite-aka-Vim-LaTeX/plugin/remoteOpen.vim:
line 33:
E174: Command already exists: add ! to replace it

Do you know why this could happen? I attach my vimrc file if this helps.

vimrc.txt

Discussion: Completion via aux file

In my version of latex-suite (https://github.com/gerw/vim-latex-suite), I have changed the mechanism of \ref-completions. The current version of latex-suite greps through the tex-file for \labels. My version greps through the aux-file. This has the advantage, that one does not have to memorize the keys within the \labels for completion, but can use the actual labels in the compiled document.

Hence, you get the following expansions (given that the tex-file has the corresponding labels):

theorem.1.3<F9>   =>   \autoref{thm:bar}
section.2<F9>     =>   \autoref{sec:foo}
(1.9<F9>          =>   \eqref{eq:baz}
(1.9)<F9>         =>   \eqref{eq:baz}

(You can also reconfigure an option to use \cref (or anything else) instead of \autoref)

This is quite convenient, because you can look in the pdf to get the appropriate number of the thing you want to refer to and use this for the completion. No need for packages like showkeys.

The only disadvantage is that you get the labels from the aux-file. Hence, if the aux-file is not up-to-date or you use the numbers from a print-out (and the aux-file is more recent), you might get unexpected results.

My question is: Can I replace the current style of the completion with this aux-based completion? This would result in less code (less maintenance) and is therefore desirable. However, I could understood if someone would like to stay with the current behavior.

The stage is open for discussion ;)

Is this GitHub better than SourceForge?

I can see that small changes to the code are made every now and then in here. But the latest release on SourceForge is from 2014. Should I rather use the code in here, or is it unstable? Plus, I would much rather use this web site than SourceForge. Could you migrate to here? With a README and a Wiki perhaps?

Why don't provided some stable version here?

I found the neweast version has some problem in insert references. Ideally it should be get the OUTLINE file pop up when I type \cite{ and then press F9, the problem is that the OUTLINE file is always empty. If I use the version on (SF](https://sourceforge.net/projects/vim-latex/), it works fine but has the known bug for change the environment as stated here.

In consider of all the above stated problems, may I suggest to provided some stable version of this great plugin?

The lastest commit `c7aa5fa` breaks EDO

To reproduce:

  1. Open a new tex file
  2. Type EDO

Expected result:

\documentclass[<+options+>]{<+class+>}

\begin{document}
<++>
\end{document}

Real result:

E\documentclass[<+options+>]{<+class+>}

\begin{document}
<++>
\end{document}

EDO works correctly before the latest commit c7aa5fa.

Test with vim 7.4 and python 2.7.12

Forward and reverse search with evince

Hi,

The evince website shows, we can do at-least forward search with evince (https://help.gnome.org/users/evince/stable/synctex-editors.html.en).
With a very vanilla .vimrc, I tried to do that.
My vimrc is:

"Vundle Plugins" {{{
filetype off
set rtp+=~/.vim/bundle/Vundle.vim/
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'vim-latex/vim-latex'          "  Latex IDE
call vundle#end()
filetype plugin indent on
" Vundle done
" "}}}

"language specific staffs:

"LaTeX: {{{
let g:Tex_ViewRule_pdf = 'evince_dbus.py'
let g:Tex_DefaultTargetFormat = 'pdf'
let g:Tex_CompileRule_pdf = 'pdflatex --synctex=1 -interaction=nonstopmode $*'
"}}}

and for test, I have this lipsum:

\documentclass[a4paper]{article}
\synctex=1
\begin{document}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr,  sed diam nonumy eirmod tempor invidunt ut 
labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores 
et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem 
ipsum dolor sit amet, consetetur sadipscing elitr,  sed diam nonumy eirmod tempor invidunt ut labore et 
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. 
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit 
amet, consetetur sadipscing elitr,  sed diam nonumy eirmod tempor invidunt ut labore et dolore magna 
aliquyam erat, sed diam voluptua. 

At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus
est Lorem ipsum dolor sit amet.
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, 
vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent 
luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, 
consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis 
nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in 
vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at 
vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit
augue duis dolore te feugait nulla facilisi.
Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim 
placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam 
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. 
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl 
ut aliquip ex ea commodo consequat.
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, 
vel illum dolore eu feugiat nulla facilisis.
hell
\end{document}

But this is not working:

the evince page is not opening with this vimrc setup.
with \ls, it shows silent ! call ForwardSearchLatex()
and stopes there.

I don't have any particular fascination about vim's method and I have tried http://tex.stackexchange.com/questions/2941/how-to-setup-synctex-with-vim-pdflatex-and-an-open-source-pdf-viewer-under-linu
as well (2nd ans is for evince, and not working either.)

Kindly help

Can't type char 'é' in TeX files

Hi there!

Thank you for developing vim-latex! Looks great. However I have an issue editing .tex files with vim.

I'm not English, so i need these special characters: á,é,í,ó,ö,ő,ú,ü,ű. All of them seems to work except 'é'. I can type it as a digraph (e'), but it's not really fast this way. It seems i can type 'é' in non .tex files.

I've installed vim-latex via Vundle.

Could anybody help me type é from keyboard? Any ideas? Thanks in advance. :)

Potential Issue with Folding

Hi there!

I'm new to vim and latex-suite, and I'm still learning; however, I am not entirely incompetent (I hope). The issue I'm having that's bugging me is that folding in my LaTeX documents is not working properly. When I open documents I see no folding, and when I use the \rf command and the :zR command nothing seems to work. This does not seem to be an issue with the included folding function, because when I actually opened up the .vim files, they were properly folded! If you could provide any insight on how to get this feature up and running, I would sincerely appreciate it (before you ask, yes, it is visible when I run :scriptnames, and the \ll and \lv commands work great!)

Thank you so much for your time,

John

dictionary missing words

I think there are some common latex command not in the dictionary, for example \exists or \forall

Windows - VimtexCompileSS! shows \"'" was unexpected

Hi,

I'm trying to get vimtex up and running on a windows 7 system; i believe i have all the prerequisites setup and am stumped as to why compilation doesn't work.

I realized while reading the docs that :VimtexCompileSS! should compile in the foreground, and in doing so i see this error message as returned by windows cmd.exe:

C:\WINDOWS\system32\cmd.exe /c (cd /D ^"C:/Users/joefromct/Documents/Templates/d   
ocument_root^" ^&^& set max_print_line=2000 ^& latexmk  -pdf -shell-escap
e  -e '$pdflatex =~ s/ / -file-line-error /' -e ^"$success_cmd = 'gvim.exe --ser
vername GVIM --remote-expr \^"vimtex#latexmk#callback^(1^)\^"'^" -e ^"$failure_c
md = 'gvim.exe --servername GVIM --remote-expr \^"vimtex#latexmk#callback^(0^)\^
"'^" ^"index.tex^")

\"'" was unexpected at this time.
shell returned 1
Hit any key to close this window...

I am stumped as to why this is happening.

I've attempted to deconstruct this command to find the offending single-quote but cannot seem to decipher the syntax/issue. A simple latexmkrc works from the command line.

I have also tried adding this to my ~/.latexmkrc: $pdflatex = 'pdflatex -synctex=1 %O %S';

I'm hoping if i resolve this issue with single-shot compilation in the foreground things will work as i'm hoping.

Any tips appreciated. thanks, -Joe

Compile part of document, editing and reload

I think it would be nice when the following would work:

  1. Select a part of document (main.tex).
  2. Vim-latex opens a file (part.tex) with the content of the part.
  3. Compile and check the results.
  4. Make some changes (in part.tex).
  5. Rebuild, check, it's okay.
  6. Close the part.tex and its content replaces the old part (step 1.) of main.tex.

The step 6. is missed now.

Problem with compile when path contains '#' character

When path to the tex file contains '#', then during compilation (\ll) gvim gives:

Error detect ed while processing f unct ion Tex_RunlaTeX .. Tex_CD:
line 1:
E194 : No alternate file name to substitute for '#': cd $path_with_#
Error detected while processing function Tex_RunLaTeX.. Tex_CompileMultipleTimes..Tex CD:
line 1:
E194: No alternate file name to substitute for '#': $path_with_#

The error note disappears immediately so it is difficult to notice the error.
In my case $path_with_# = D:\data\somefolder#badfolder\test.tex
ViM is in version 7.4, this has been observed on Windows 7 x64, latex is MikTex. latex $path_with_# does not give any errors.

Getting two starting double quotes

Normally when I type the quote (") twice, I would get

``''<++> 

But recently when I start to insert texts, this environment becomes

````<texts>''<++> 

Another starting double quote would be inserted automatically along with a "beep" sound. It happens both in unix and dos formats file running in Windows 7, but it didn't happen before.
The folowing is the configurations for vim-latex in my vimrc:

set shellslash
set grepprg=grep\ -nH\ $*
let Tex_FoldedSections=""
let Tex_FoldedEnvironments=""
let Tex_FoldedMisc=""
let g:tex_flavor='latex'
let g:Tex_CompileRule_pdf = 'pdflatex -interaction=nonstopmode $*'
let g:Tex_DefaultTargetFormat = 'pdf'
let g:Tex_MultipleCompileFormats='pdf,aux'
let g:Tex_ViewRule_pdf = 'E:\ProgramFiles\SumatraPDF\SumatraPDF.exe'

function CompileXeTex()  "|use xelatex to compile temporarily
    let oldCompileRule=g:Tex_CompileRule_pdf
    let g:Tex_CompileRule_pdf = 'xelatex -interaction=nonstopmode $*'
    call Tex_RunLaTeX()
    let g:Tex_CompileRule_pdf=oldCompileRule
endfunction
map <Leader>lx :<C-U>call CompileXeTex()<CR>

Any help is much appreciated.

not compiling on windows...

This is my vimrc file (only the part related to this plugin):

" vim latex settings
" IMPORTANT: win32 users will need to have 'shellslash' set so that latex
" can be called correctly.
set shellslash
" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to always generate a file-name.
set grepprg=grep\ -nH\ $*
" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor='latex'
" set compile rule 
let g:Tex_CompileRule_dvi = 'latexmk $*'

when I press \ll it displays this:
capture
and then it inserts werid text about airline:
capture1
and there is no output of the result

I have checked latexmk is working properly, and I am pretty sure that this is somehow related to vim latex, because airline text do not show up when I press \ll in other file type.

Feature discussion: Modular activation of subsets of latex-suite's features.

latex-suite has a lot of features, it introduces normal mode and insert mode maps, sets options, provides templates, ... Not all users might need, use or want all of these but still prefer the other features of latex-suite over any alternative plugin.

I propose to organize the code base of latex-suite in such a way that its functionality can be activated/deactivated in a modular fashion. The idea is inspired by vim-pandoc, they even advertise this in their README. A short initial discussion is in #39.

If this is implemented users could put lines like this in their vimrc:

let latexsuite#load_maps = 1
let latexsuite#load_imaps = 0
let latexsuite#load_menus = 0
" ...

If a module is not explicitly activated/deactivated it could default to activated.

What do you think about the idea in general? What feature sets can be identified that deserve a name? Can we just take the TOC of the help file to identify these? How should the variables be named (vim-pandoc uses two lists g:pandoc#modules#enabled and g:pandoc#modules#disabled)?

Question: How to creating new syntax items or group under vim-latex context?

I tried to define my own syntax item for my custom match patterns, as following:

hi def syn1 guifg=#ff5f00
syntax match syn1 /%||[A-Za-z0-9]\+\>.*/

But the snippet didn't work within \begin{document} \end{document} environment.

If I change syn1 to vim-latex or vim biuld-in syntex item, say texStatment, such as
syntax match texStatment /%||[A-Za-z0-9]\+\>.*/
, it works well!

Any suggestions about how to create new syntax item that works within \begin{document} \end{document} environment?

Thanks!

No way to disable annoying IMAPs

The following mapping are extremely annoying when trying to edit the LaTeX sources of the C++ standard because most of them are very common sequences in C++ code:

call IMAP ('__', '_{<++>}<++>', "tex")
call IMAP ('()', '(<++>)<++>', "tex")
call IMAP ('[]', '[<++>]<++>', "tex")
call IMAP ('{}', '{<++>}<++>', "tex")
call IMAP ('^^', '^{<++>}<++>', "tex")
call IMAP ('$$', '$<++>$<++>', "tex")
call IMAP ('==', '&=& ', "tex")
call IMAP ('~~', '&\approx& ', "tex")
call IMAP ('=~', '\approx', "tex")
call IMAP ('::', '\dots', "tex")
call IMAP ('((', '\left( <++> \right)<++>', "tex")
call IMAP ('[[', '\left[ <++> \right]<++>', "tex")
call IMAP ('{{', '\left\{ <++> \right\}<++>', "tex")

For example, it's not possible to write std::string in the C++ source because it gets changed to std\dotsstring (which isn't even valid LaTeX!)

These mappings should be optional, instead of assuming that every user of the latex-suite files wants them.

The mappings that start with Tex_Leader are OK, as they don't happen while entering plain text, so they don't hijack normal keys.

Unpredictable jumps after compilation

Hey,

since recently vim jumps - at least for me in a unpredictable way - around either in the current buffer or it jumps into another recently opened (but now closed) file (can also be the window of NERDTree, so i guess it does not try to jump to an error) after compilation, which is kind of cumbersome.
I try to compile a multi file project with multiple .tex files in different sub-directories.
I run archlinux with vim 8.0 and the latest git version of vim-latex from the aur aur:vim-latexsuite-git.

The relevant options in my vimrc are

let g:Tex_DefaultTargetFormat = 'pdf'
let g:Tex_MultipleCompileFormats = 'pdf'
let g:Tex_CompileRule_pdf = '/usr/local/texlive/2016/bin/x86_64-linux/pdflatex -  interaction=nonstopmode -shell-escape $*'
let g:Tex_ViewRule_pdf = 'zathura -l error'
set grepprg=grep\ -nH\ $*
let g:tex_flavor = "latex"

" Don't go to error
let g:Tex_GotoError = 0

let g:Tex_IgnoredWarnings =
\'Underfull'."\n".
\'Overfull'."\n".
\'specifier changed to'."\n".
\'You have requested'."\n".
\'Missing number, treated as zero.'."\n".
\'There were undefined references'."\n".
\'Citation %.%# undefined'."\n".
\'multiply defined.'."\n".
\'There were multiply-defined labels.'."\n".
\'undefined on input'."\n".
\'contains only floats'."\n".
\'Float too large'."\n".
\'Reference'."\n".
\'LaTeX Font Warning'."\n"
let g:Tex_IgnoreLevel = 14`

As already mentioned, this behavior is fairly new but i can't really determine at which point it started. I haven't tried to downgrade vim, though. Maybe it is related to the recent update to vim 8.0?

Any suggestions?

Anyways, thanks for your work on vim-latex, i really appreciate it.

best,

s-bl

Add support for 'biber' backend for BibLaTeX

Currently LaTeX Suite has excellent support for bibliography management using BibTex, however there are issues when trying to run BibLaTeX in combination with the 'biber' backend.
Specifically, when setting up multiple compilation to use biber it looks for a file of the wrong file extension 'bbl' instead of 'bcf' as described here:
http://tex.stackexchange.com/questions/83715/biber-backend-and-vim-latex.

Also, the reference completion dialog will only work when using the \bibliography command and not the \addbibresource command that is used in BibLaTeX.

I suggest mainly two changes:
Add a global g:Tex_BibtexFilext variable which allows one to change the file extension of the bibliography target file, and adding support for looking up bibliographies referenced using \addbibresource command.
If the authors are content with the changes, I could submit a PR if wanted.

type e^^ but I get wrong result

To reproduce:

1. open a .tex file
2. enter "equation" and then press "F5"
3. type e^^

Expected result:

e^{}<++>

Real result:

e<++>

Test with vim 8.0 on Xubuntu

Auto-detecting bibtex flavor?

So I've started using Biber rather than Bibtex recently, but I haven't (and probably won't) be moving all my old papers to Biber. This means that, for now, I sometimes have to set g:Tex_BibtexFlavor = "biber"/"bibtex" depending on which project I am currently working on. Note that as long as I set BibtextFlavor correctly, biber does work just fine.

I use biber via \usepackage[backend=biber]{biblatex}which seems fairly easy to detect. I think a regex for \\usepackage\[backend=\([a-z]\+\)\]{biblatex}could spot biber here, and if so set the correct value for BibtexFlavor. I've tried to write my own code to detect this, but I'm not a vim expert and am still somewhat fumbling around in the dark.

Is there any particular reason that we don't detect this, or other ways of specifying a backend?

Smart Key Mappings are not working at all

When I type in double quotes, the default behavior is that " should be translated to `` or '' automatically depending on whether is the opening or closing quote. However, the current version (as of Feb. 17, 2017) is not doing that at all. Also, ... is not translated to \ldots automatically.

Both g:Tex_SmartKeyQuote and g:Tex_SmartKeyDot are set to 1.

I also tried "set backspace=start", not helping at all.

`section`+`F5` Bug?

To reproduce:

1. Open a new tex file
2. Type `section`
3. Press `F5`

Expected result:

\section{<++>}<++>

Real result:

0\section{<++>}<++>

Test with vim 7.4 and python 2.7.12

Some accented characters not displayed in insert mode

In insert mode, some characters such as "é" or "â" are not taken into account.

One have to add the following line in a ~/.vim/ftplugin/tex.vim file for instance.

imap <buffer> <m-c> <Plug>Tex_InsertItemOnThisLine

We can now print "é" characters but still no "â".

'\cite{+<F9>" not work with newest python 2.7.*

If I type "\cite{" then press F9, after type a I will get the following error:

Name Error: name 'Tex_BibFile' is not defined

which maybe a bug and can be fixed by upgrade to python3. I install python3 in windows7 by cygwin64.

install_python3

Detection of error location interferes with compiling bibliography

When I cite the following bibtex item (using the abbrvnat bibliography style):

@article{DBLP:journals/mscs/LiquoriS08,
  author    = {Luigi Liquori and
               Bernard P. Serpette},
  title     = {iRho: an imperative rewriting calculus},
  journal   = {Mathematical Structures in Computer Science},
  volume    = {18},
  number    = {3},
  pages     = {467--500},
  year      = {2008},
  url       = {http://dx.doi.org/10.1017/S0960129508006750},
  doi       = {10.1017/S0960129508006750},
  timestamp = {Thu, 19 Jun 2008 08:56:04 +0200},
  biburl    = {http://dblp.uni-trier.de/rec/bib/journals/mscs/LiquoriS08},
  bibsource = {dblp computer science bibliography, http://dblp.org}
}

I get the following output:

skaermbillede 2015-06-18 kl 10 04 33

which vim-latex somehow reads as an error message, and then fails when it tries to go to the error location:

skaermbillede 2015-06-18 kl 10 06 57
skaermbillede 2015-06-18 kl 10 06 49

Indentation goes crazy by template inserting

I'm not sure if anyone have similar problems, but when I :TTemplat my custom template. The indentation will keep incremented.

The work around for me was to modified the templates.vim file as following:
Start with line:137

    com! -complete=custom,Tex_CompleteTemplateName -nargs=? TTemplate :se paste
        \| :call <SID>ReadTemplate(<f-args>)
        \| :se nopaste

Any better suggestions?

Hiding error output from viewer

This isn't exactly a bug with Vim-LaTeX itself, but due to issues with evince and certain pdfs being used as figures, the following often appears all over the terminal screen:

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed

These can be removed with a :redraw!, but ideally, when VIm-LaTeX opens up an external application, e.g. evince to view the pdf output, it should pipe the error output (and stdout) to /dev/null or open it with silent! or something similar.

Also, sometimes when compiling with BibTeX, numerous errors appear on the screen in a similar fashion. These should be stopped ideally.

Autocomplete \cite does not work with 'autochdir'

I have a multiple file directory and when I hit on a cite command in a file that is not the main file no suggestions are shown. I've uploaded a small working copy that showcases the issue. When I am editing chapter1.tex and insert ~\cite{ and press the suggestion box is empty. If I press in main.tex the references will show. I've uploaded my vimrc file for reference as well.

I am using the latex vim-latex from master and I am running OS X El Capitan V 10.11.6

Thank you for your time.

Regards,
Noel

vimrc.zip
test.zip

Problem with "set noimd" when using Korean

I am using the newest MacVim on Sierra and sometimes write latex in Korean.
The vim-latex plugin is installed by using "vimplug".

The problem with Korean is that the vim hotkeys does not work in Korean, so I used to use the trick using "set noimd" which automatically change the input language when exiting the insert mode.

It works fine with other plugins, but with vim-latex I get problems when writing Korean.
For example, when I write "Welcome" in Korean, it should look like as follows:

"환영합니다"

But with vim-latex mode, it looks like as follows:

"ㅎㅗㅏㄴㅇㅕㅇㅎㅏㅂㄴㅣㄷㅏ"

That is, syllables are shown as alphabets are taken apart.
And when "set noimd" is commented out, then everything ok.

Any idea how to solve this problem?
Buy the way, I tested the "vimtex" plugin, but the problem did not occur.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.