Difference between revisions of "Sublime Text Setup"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Cipscis
(→‎Viewing Papyrus Assembly: Adding link to Papyrus Assembly package for Sublime Text 2 on Skyrim Nexus)
imported>Cipscis
(Pointed to new SKSE version of Papyrus package)
Line 6: Line 6:
#Copy the Papyrus folder from [[Media:Papyrus.zip|this zip file]] to your local drive: <code>%AppData%\Roaming\Sublime Text 2\Packages</code>
#Copy the Papyrus folder from [[Media:Papyrus.zip|this zip file]] to your local drive: <code>%AppData%\Roaming\Sublime Text 2\Packages</code>


<blockquote>'''Skyrim Script Extender Users''': Update the Papyrus.tmLanguage file included with the above .zip using [http://pastebin.com/5Kyh3h9w this pastebin]. It includes Skyrim Script Extender functions and will be kept up to date as more functions become available. (Community created; not supported by Bethesda. :-) )</blockquote>
<blockquote>'''Skyrim Script Extender Users''': A version of the package with SKSE support is also available: Download [[Media:Papyrus SKSE.zip|this zip file]] instead.</blockquote>


==Quick Compile==
==Quick Compile==

Revision as of 04:51, 26 September 2012

Sublime Text is a new text editor that has a lot of modern features, a pretty cool dev community, and a very slick feel to it. We've made a package for it that makes it a good tool for developing Papyrus scripts.

Loading syntax highlighting and auto-complete

  1. Go to the Sublime Text website and install the latest release of version 2.
  2. Run the program at least once so it will set up its preferences and whatnots.
  3. Copy the Papyrus folder from this zip file to your local drive: %AppData%\Roaming\Sublime Text 2\Packages

Skyrim Script Extender Users: A version of the package with SKSE support is also available: Download this zip file instead.

Quick Compile

Assuming that your copy of the Papyrus Compiler and its associated batch files are in their default locations and "Tools" > "Build System" > "Papyrus" has been selected, you should be able to hit F7 or Ctrl+B while looking at a Papyrus file to run it through the compiler. (The output will appear in the bottom panel, so be sure to check for any errors!)

Updating the snippets

The existing Papyrus package for Sublime Text includes a number of snippets that will auto-complete to frequently used things (like typing "onhit" and then tab will create a proper OnHit event so you don't have to constantly be looking up the syntax). If you want to make more of these, you can simply add another .sublime-snippet file to the Package directory. Documentation on snippets is available at Sublime Text docs site.

Viewing Papyrus Assembly

If you're interested in viewing Papyrus assembly files (the midway point between source and compiled scripts, file extension .pas), a package is available that provides syntax highlighting and a build system for the Papyrus assembly language.

This package is currently available on Skyrim Nexus - Papyrus Assembly package for Sublime Text 2