Skip to content

Instantly share code, notes, and snippets.

@itkq
Last active August 23, 2016 06:26
Show Gist options
  • Save itkq/a568b963b1d8f998260a2e04c5c05510 to your computer and use it in GitHub Desktop.
Save itkq/a568b963b1d8f998260a2e04c5c05510 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
MACHINE=default
IMAGE=texlive2015
if docker-machine ls | grep $MACHINE | grep -q "Runnning"; then
docker-machine start $MACHINE
fi
docker ps 2> /dev/null
if [ $? -ne 0 ]; then
eval $(docker-machine env $MACHINE)
fi
if [ ! -e *.tex ]; then
echo 'Not found .tex'
exit 1
fi
docker run --rm -v $(pwd):/var/texlive $IMAGE latexmk
let g:quickrun_config = {
\ "_" : {
\ "runner" : "vimproc",
\ "runner/vimproc/updatetime" : 40,
\ 'outputter' : 'error',
\ }
\}
let g:quickrun_config["latexmk"] = {
\ 'command' : 'quickrun-latexmk',
\ 'outputter/error/error' : 'quickfix',
\ 'exec' : '%c',
\ }
autocmd BufWritePost *.tex :QuickRun latexmk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment