Skip to content

Instantly share code, notes, and snippets.

@stefco
Forked from bagrow/vimtex_workflow.txt
Created July 17, 2018 05:41
Show Gist options
  • Save stefco/8ed3099947d573a20cfd76915d2afe0e to your computer and use it in GitHub Desktop.
Save stefco/8ed3099947d573a20cfd76915d2afe0e to your computer and use it in GitHub Desktop.
Some details for my macvim/skim/latexmk workflow
MacVim + latexmk + Skim workflow:
MacVim http://code.google.com/p/macvim/
Latexmk http://www.phys.psu.edu/~collins/software/latexmk-jcc/
Skim.app http://skim-app.sourceforge.net/
Open the texfile in macvim:
$ mvim <file>.tex
Watch tex file with latexmk (see also ~/.dotfiles/latexmkrc):
$ latexmk -pdf -pvc <file>.tex
Open the output in skim:
$ open -a Skim <file>.pdf
* Setup Skim -> MacVim search:
Enable Preferences > Sync > Check for file changes
Preset = Custom
Command = mvim
Argument = --remote-silent +":%line" "%file"
(for the argument, be careful about folding/foldo/etc...)
* Setup MacVim -> Skim search:
map <silent> <Leader>lk :silent !/Applications/Skim.app/Contents/SharedSupport/displayline
\ <C-R>=line('.')<CR> "<C-R>=LatexBox_GetOutputFile()<CR>" "%:p" <CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment