When loading any latex file in vim run in konsole with vim-latex plugin enabled I get Error detected while processing BufRead Autocommands for "*.tex"..function dist#ft#FTtex[49]..FileType Autocommands for "*"..function <SNR>19_LoadFTPlugin[18]..script /usr/share/vim/vimfiles/ftplugin/tex_ latexSuite.vim[12]../usr/share/vim/vimfiles/ftplugin/latex-suite/main.vim[969]../usr/share/vim/vimfile s/ftplugin/latex-suite/texviewer.vim: line 895: /usr/share/vim/vimfiles/ftplugin/latex-suite/bibtools.py:34: SyntaxWarning: invalid escape sequence '\s' """ Press ENTER or type command to continue Reproducible: Always Steps to Reproduce: 1. Load any .tex file 2. Observe the warning on loading the file 3. After pressing ENTER editing proceeds seemingly normally Expected Results: No errors/warnings on loading the file
https://github.com/vim-latex/vim-latex/commit/f108868ae9a85bf33f5ead06fd0b89d27d951165
The error/warning comes from line 47 of /usr/share/vim/vimfiles/ftplugin/latex-suite/bibtools.py:34 class Bibliography(dict): def __init__(self, txt, macros={}): """ txt: a string which represents the entire bibtex entry. A typical entry is of the form: @ARTICLE{ellington:84:part3, author = {Ellington, C P}, title = {The Aerodynamics of Hovering Insect Flight. III. Kinematics}, journal = {Philosophical Transactions of the Royal Society of London. Series B, Biological Sciences}, year = {1984}, volume = {305}, pages = {41-78}, number = {1122}, owner = {Srinath}, Line 47 >> pdf = {C:\srinath\research\papers\Ellington-3-Kinematics.pdf}, timestamp = {2006.01.02}, } """ where in pdf = {C:\srinath\research\papers\Ellington-3-Kinematics.pdf} \s \r \p \E are attempted to be interpreted as Python escape sequences. I never coded in Python, but what I read from the docs, triple quotes """ """ do not stop escape sequences to be interpreted. One needs to preceded the string with 'r', i.e. have def __init__(self, txt, macros={}): r""" txt: ..... that seems to work for me.
Wow, that was a fast reply :)