lutz.blogs.tech

The first post and how to install vimtex

Good evening (or morning),
this is my first post on my newly created tech blog on my personal website. As you might have noticed, I already have a blog on the very same personal website, but this is solely dumb writing using german words. Since I'm not a native english speaker I hope you can forgive my numerous grammatical errors. Also there'll be no comment section, but if you want to correct my atrocious grammar feel free to write me an email.

I want to provide some short tutorials or tricks I think are interesting on this tech blog in the future (e.g. how to fix a broken arch installation). Mostly those posts will be adapted wiki articles from my personal knowledge base, but to get an idea what I'm talking about and test this websites markdown renderer, I'm going to show how to add latex support to vim.

Vimtex Setup

Vim is undoubtedly the best editor ever made, clearly you have to use it for editing or creating latex documents. To get features like live compilation or syntax highlighting you could use the Vimtex plugin. At first make sure to use some kind of plugin manager like Vundle or Pathogen. I will use vundle in this example.

  • add the plugin to the .vimrc: Plugin 'lervag/vimtex'
  • add the following configuration section to the .vimrc:

let g:tex_flavor='latex'
let g:vimtex_view_general_viewer = 'evince'
let g:vimtex_quickfix_mode=0
set conceallevel=1
let g:tex_conceal='abdmg'

This sets your default document viewer to 'evince', and set some other vimtex parameters. To compile a document use <leaderkey>l, in my case it would be \ll. This should be it and you can use latex with vim.


Zurück | mehr Informationen