This project is not meant to be a replacement of already existence latex plugins for vim. The script is far from complete, use it at your own risk, however, fell free to ask about something relating to the script and help improving it :)
To start using this script you must install the following packages in your system:
- Suckless tabbed
- Suckless dmenu
- Zathura PDF Reader (
pacman -S zathura zathura-pdf-poppler
) - Vim or Neovim (
pacman -S vim
orpacman -S neovim
)
Steps to use:
- Copy or clone
vimlatex
script somewhere in yourpath
. - vimlatex will create a folder
$HOME/Docs/latex
if$VL_DIR
is unset. - Copy the
new-article.tex
file inside$VL_TEMPLATE_DIR
. This is$HOME/Docs/latex/templates
if$VL_TEMPLATE_DIR
is unset. - Depending which shell you use, you will need to edit your
.env
file to override vimlatex default variables:export VL_DIR="$HOME/Docs/latex" export VL_TEMPLATE_DIR="$VL_FOLDER/templates" export VL_OUTPUT="/tmp" export VL_COMPILE_METHOD="xelatex"
- vimlatex will create a
.exrc
automatically inside your$VL_FOLDER
, but you can override it if you wish. - execute
vimlatex
and selectEmpty file
from dmenu prompt. - Give a name to the new file.
- A window containing zathura should open up, depending on how you installed tabbed you should be able to navigate to the next tab using vim keys, please read tabbed documentation for more details.
Your directories should look like this:
├── /home
│ └── /user # Your user directory.
│ ├── ~/Documents
│ │ ├── .env # Depending which shell you use (zsh, bash) you should modify your own (.zshenv, .bashrc)
│ │ └── /latex # Latex main folder, here is where you store all you .tex files
│ │ ├── .exrc # External vim file where compile command is stored.
│ │ ├── example.tex
│ │ ├── github.tex
│ │ ├── my thesis.tex
│ │ └── /templates # Latex template directory, you can create many templates as you need.
│ │ ├── math.tex
│ │ ├── new article.tex
│ │ ├── resume.tex
│ │ ├── thesis.tex
│ │ └── todo list.tex
│ └── /.local
│ └── bin # Your .local/bin here is where you should put your own scripts.
│ └── vimlatex # The vimlatex script
└── /tmp # Ouput folder, you can change this with vimlatex .env variables
└── output.pdf # The resulting PDF file.
Topics and features i would like to add in the near future to the script:
- [] Manage template folder from dmenu prompt:
- [] Create new templates.
- [] Edit existing templates.
- [] Delete templates.
- [] Copy PDF to your clipboard from dmenu prompt.
- [] Create Workspaces from dmenu prompt:
- [] Edit multiple
.tex
files to generate a big PDF (thesis, documentation).
- [] Edit multiple
- [] Create a CLI version.
- [] Compile latex in the background when idle instead of when saved.