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

fix syntax #174

Closed Garonenur closed 10 years ago

Garonenur commented 10 years ago

This is a follow up to #124.

This changes the behaviour as follows: \lstinline behaves like \verb and \lstinputlisting behaves as any other file input would. I think this makes much more sense and also the lstinputlisting was broken if any macro was used within the argument of it, like \lstinputlisting{\MyPath/foo.bar}. Which would result in "verbatim" syntax until the next normal latex-macro.

Edit: Fixed typos.

Garonenur commented 10 years ago

I have to correct myself, \lstinline has not the correct syntax if other chars than {} are used, which would be better.

lervag commented 10 years ago

Ok, so if I understand correctly: \lstinline now has the same syntax highlighting as \verb, even though the command only works with {}. This is acceptable, I guess.

I assume you have tested this and that you are sure it is an improvement?

Garonenur commented 10 years ago

I changed it for me, because of the brokenness of lstinputlisting and than realized, that lstinline should be like verbatim and lstinputlisting like any other file input. I am using this right now and it looks fine, if you want I can check some more files if the syntax is broken anywhere.