LaTeX forum ⇒ OthersRemove auxiliary Files in Sublime Text Topic is solved

Information and discussion about other LaTeX editors not listed above
lawlist
Posts: 6
Joined: Sun Feb 24, 2013 11:00 pm

Remove auxiliary Files in Sublime Text  Topic is solved

Postby lawlist » Tue Feb 26, 2013 8:29 pm

Here is the working code posted originally by bjmorgan on https://gist.github.com/bjmorgan/4349538

------------------------------------------------
Bibtex.sublime-build
  1. {
  2. "cmd": ["bibtex", "$file_base_name"],
  3. "path": "$PATH:/usr/texbin:/usr/local/bin",
  4. "file_regex": "^(...*?):([0-9]+): ([0-9]*)([^\\.]+)",
  5. "selector": "text.tex.latex"
  6. }

------------------------------------------------
CleanLatexFiles.sublime-build
  1. {
  2. "cmd": ["latexmk", "-C", "$file"],
  3. "path": "$PATH:/usr/texbin:/usr/local/bin",
  4. "file_regex": "^(...*?):([0-9]+): ([0-9]*)([^\\.]+)",
  5. "selector": "text.tex.latex"
  6. }

------------------------------------------------
Default (OSX).sublime-keymap
  1. [
  2. // Run bibtex
  3. { "keys": ["super+shift+b"],
  4. "command": "run_latex_build",
  5. "args": {
  6. "build_system": "Packages/User/Bibtex.sublime-build",
  7. "reset_to": "Packages/LaTeXTools/LaTeX.sublime-build"
  8. },
  9. "context": [
  10. { "key": "selector", "operator": "equal", "operand": "text.tex.latex" }
  11. ]
  12. },
  13. // Clean up LaTeX auxiliary files.
  14. {
  15. "keys": ["super+shift+c"],
  16. "command": "run_latex_build",
  17. "args": {
  18. "build_system": "Packages/User/CleanLatexFiles.sublime-build",
  19. "reset_to": "Packages/LaTeXTools/LaTeX.sublime-build"
  20. },
  21. "context": [
  22. { "key": "selector", "operator": "equal", "operand": "text.tex.latex" }
  23. ]
  24. }
  25. ]

------------------------------------------------
run_latex_build.py
  1. import sublime
  2. import sublime_plugin
  3.  
  4. class RunLatexBuildCommand(sublime_plugin.WindowCommand):
  5. def run(self, build_system, reset_to):
  6. self.window.run_command( "set_build_system", {"file": build_system } )
  7. self.window.run_command( "build" )
  8. self.window.run_command( "set_build_system", {"file": reset_to})

------------------------------------------------

See also:

http://www.latex-community.org/forum/vi ... 12&t=22763

Tags:

marciano
Posts: 2
Joined: Sat Oct 17, 2009 2:41 am
Location: Chicago, USA
Contact:

Postby marciano » Sun Jun 23, 2013 2:19 am

A quick heads-up: recent versions of the plugin have this functionality built-in. Hit C-l,backspace (where C stands for Ctrl on Win/Linux and Cmd on Mac) and auxiliary files will be deleted.


Return to “Others”

Who is online

Users browsing this forum: No registered users and 1 guest