Thanks for the suggestion vim, I've tried but got problems.
# -*- coding: utf-8 -*-
import sublime, sublimeplugin
def run(self, view, args):
f = view.fileName()
print "the file is %s"%f
result = os.system("pdflatex " + f)
def isEnabled(self, view, args):
(pdflatex is in my PATH so I don't need to put the ".exe" behind it).
I've binded the command to a key, but nothing seems to happen.
So, I've tried to do a 'LaTeX.sublime-build' file with this (I took it from the Haskell one):
buildCommand exec "^(...*?):([0-9]*):?([0-9]*)" pdflatex.exe '"$File"'
It works, but in fact I really don't know what I'm doing. What's the regexp "^(...?):([0-9]):?([0-9]*)" for ?
And now that my file ie "myfile.tex" has been compiled to "myfile.pdf", how to call my reader on it ? $File returns the file name, I need it without its extension + "pdf" ($File:-3]+"pdf" in Python). It must exist other variables like $File, but what are their names ?
I know it's pain to write documentation, but Sublime really needs better docs (the wiki has become unreadable). We can all help jps on this point, I think it's no problem.