LaTeX: replacing “-quotation marks with \glqq{} and \grqq{} in vim

If you ever had the problem that your LaTeX document contains wrongly formatted quotation marks (either in a german or english text), you most likely went all the way through your document searching for quotation marks and replacing them accordingly. Here are easy vim commands using the substitution feature (similar to the unix sed command) to replace all occurrences of quotation marks with the correct replacement for english texts:


And this one for german texts:



HowTo Word Break Type-Writer in LaTeX

By default LaTeX does not insert word breaks in type writer fonts, because the font has no dedicated character for hyphenations. But you can set the ‘-‘ as the corresponding character:

% line breaks in tt fonts
\renewcommand{\ttfamily}{\origttfamily \hyphenchar\font=`\-}