# Tag Info

25

It would help to know which, if any, LaTeX plugin you're using for vim. (E.g., the latex-suite, vim-auctex, latex-box, etc.) Next, as far as viewer choice, the only widely used open source PDF viewer for Linux which currently supports SyncTeX well out of the box is Okular. That's probably your best choice. There are instructions fo setting up SyncTeX with ...

25

I suppose you already have Vim installed in your operating system. Usually, the installation is very straightforward for every operating system. For Macs, we have MacVim, and AFAIK two options are available: Getting the correct MacVim version for your operating system in the project website, unzip the archive file and drag MacVim.app to your Applications ...

23

I would highly recommend the vim latex-suite, which you can get either from http://vim-latex.sourceforge.net/index.php?subject=manual&title=Manu or (on an Ubuntu machine) using sudo apt-get install vim-latexsuite sudo vim-addons -w install latex-suite It provides many shortcuts. If I were going to type your first summation ...

23

Disclaimer: I usually edit .tex files in Vim, but I don't use the Vim-LaTeX suite. I wouldn't say the following suggestions are tricks per se - they are provided by third-party plugins - but they actually help me with my usual TeX workflow: snipMate Created by Michael Sanders From the manual: snipMate.vim aims to be an unobtrusive, concise vim script ...

22

The Vim-LaTex / LaTeX-Suite for Vim adds these markers automatically and by intension. You can jump to the next such marker using CTRL+J, which removes this marker. The idea is to speed things up by allowing you to jump to the end of the group or environment which was just added. This is also useful for templates where you can add <+name+> markers ...

21

I have the following function in my $VIM/ftplugin/context.vim file to format ConTeXt paragraphs (same as LaTeX: the environments are enclosed in \start... and \stop... instead of \begin{...} and \end{...}. It should be easy to adapt this to LaTeX (In fact, I think that I copied it originally from someone who had written it for LaTeX and adapted it to ... 16 If you write "... this was written by \ref{foo}" the following output is possible: ... this was written by [1] which looks ugly in fact of the linebreak. This is the reason why vim is very nice to you and told you that you should write: "... this was written by~\ref{foo}". Then your output is at least: ... this was written by [1] So it is not a ... 14 The following hopefully answers your "abbreviated questions": vim suggests inserting \@ before . in ...GRIP/ABP. So, do it! The reason here is that GRIP/ABP or any capitalized word before a period is usually an abbreviation. And, in some instances, abbreviations have periods, while some don't. To treat the end-of-abbreviation period as an end-of-sentence ... 13 Your question is a little confusing. What you mean is compiling a LaTeX document manually (into a PDF). You might want to adjust your title. Creating one would be the process of writing the document. This can be done in the command line using pdflatex <filename>. In VIM you could just use ESC:!pdflatex % (% can be used instead of the current filename) ... 11 This is a solution for evince, thanks to José Aliste who wrote gedit-synctex-plugin: Preamble Download these files deflate them to ~/bin (or something within$PATH) Backward Search (Evince → Editor) Adopt the first line of »~/bin/evince« (EDITORCMD) to your needs. (run »evince_backward_search« to get help for possible entries) Compile your .tex File ...

11

With the vim-latexsuite spell-checking works fine. Since it makes typing latex files a lot easier and faster I can only recommend it to every LaTeX-writing vim user.

11


8

As morbusg mentioned, the surround plugin is the way to go. You select the text eg. using visual mode, then you press S and the closing brace }. You can use any character with a matching partner: ], >, ), etc. If you use the left part of the pair, it additionally surrounds the selected text with a space. Example: Computational Skills Learned: Assuming ...

8

SumatraPDF can be called with commandline options, see help manual. The option -reuse-instance will do the trick The final modification that made it works is this: let g:Tex_ViewRule_pdf = 'SumatraPDF -reuse-instance'

8

\Copy probably isn't used as a document level command but then that is because it's not a good name for a document level command (according to the somewhat under-enforced LaTeX command naming guidelines). See Macro naming best practice? Other possibilities would be: emacs naming (clearly good:-) \kill and \yank (but some people may find that a bit ...

7

err..right, this works: " redef C-j to C-g imap <C-g> <Plug>IMAP_JumpForward nmap <C-g> <Plug>IMAP_JumpForward

7

I know it's against policy to answer commenting on other answers, but in this case -- given I lack the 50 reputation needed to comment directly on the relevant answer -- I think it's worth it. The function provided by Aditya functions perfectly for LaTeX, mutatis mutandis, except for one detail: often after beginning an environment, or a section, the very ...

7

The following solution only applies to paragraph formatting, it will properly work depending on the LaTeX styling settings. Another possible solution would be to set a hard wrap of 80 characters. http://vimcasts.org/episodes/hard-wrapping-text/ formatoptions: t - Auto-wrap text using textwidth c - Auto-wrap comments using textwidth, ...

7

Kile has vim mode, as it uses kate as the editing component. It can be set under Settings/Editing/Editor/Vi input mode. It does not support all vim features, but I found it good enough for what I needed (i.e. usual way to type/search/copy/move/...)

7

I stumbled upon this one today, as also already posted above. http://michaelgoerz.net/refcards

Only top voted, non community-wiki answers of a minimum length are eligible