Commits

John Lenz committed 60ec800

Final changes to vim plugin post

  • Participants
  • Parent commits 10b48ae

Comments (0)

Files changed (1)

File posts/2013-05-09-latex-vim-plugins-part2.markdown

 title: LaTeX and Vim Part 2
 author: John Lenz
 tags: latex, vim
-date: May 8, 2013
+date: May 9, 2013
 ---
 
-As I mentioned in the [last post](2013-04-05-latex-vim-plugins.html), I no longer use the Vim-LaTeX
-plugin but have replaced it with several single-purpose plugins.
+This is a continuation of my [last post](2013-04-05-latex-vim-plugins.html), explaining the plugins
+and configuration I use for Vim and LaTeX.
 
 # Forward Search
 
 endfunction
 ~~~
 
-To use it, you can either use ":Pdf <label>" with tab completion if you have set up the tag
-generation, or you can use \e to have Vim search earlier in the file from the cursor for a label and
+To use it, you can either use ":Pdf \<label\>" with tab completion if you have set up the tag
+generation, or you can use \\e to have Vim search earlier in the file from the cursor for a label and
 open the PDF to the page containing that label.  I should perhaps add the ability to search up and
 down and pick the nearer label.  To quickly navigate around, I use Ctrl-P on tags so I can, with a
 few keystrokes, jump in Vim to the label and then open evince.
 endsnippet
 ~~~
 
-But the similar snippet I have for lemma is not folded.  I also have snippets for generic begin
-(without markers) and beginf (with markers).
+# Indent
+
+Vim has builtin TeX indenting but there are a few settings you can change to control the indent. The
+settings are listed in the comments at the top of /usr/share/vim/vim73/indent/tex.vim.  The
+indenting works well, but I am still only 95\% happy with the indenting.  I might look at fixing the
+last few corner cases, mostly related to indenting within an equation or align block.
+
+# Final Thoughts
+
+That is basically my vim + TeX environment.  I have a few more settings configred like textwidth,
+indent, some shorthand maps for tag completion, and [this
+tip](http://vim.wikia.com/wiki/Formatting_paragraphs_in_LaTeX:_an_%22environment-aware_gqap%22) for
+rewrapping paragraphs.  
+
+The only major problem I have is that LaTeX compiler output sucks badly. Rubber does a decent job
+cleaning up the output so that a vim errorformat can jump between errors, but still there are a lot
+of errors that don't specify a line number, sometimes errors only give a page number, sometimes give
+no mark where they occur at all.  Especially things like mismatched braces which every other
+compiler seems to provide helpful error messages, TeX just tells you some problem is in a paragraph.
+The excellent plugin [syntastic](https://github.com/scrooloose/syntastic) has support for displaying
+error messages if they were generated, and syntastic does use lacheck and/or chktex.  But both of
+those tools are limited and both are no longer developed.  I feel that a better checking tool is
+needed, one that provides nice error messages and warnings.  I started work on just such a tool
+called [latex-candle](https://bitbucket.org/wuzzeb/latex-candle) but am currently working on other
+things.  Perhaps I will come back to it in the future though, or would help on another project if
+one existed.