Getting Started with Lawtex
Are you new to programming in Lawtex and unsure where to start? If this is your first time using the language (or even programming), follow the steps below to set up your environment!
Here’s what we’ll cover:
- Downloading a text editor (Sublime Text or VS Code)
- Installing the Lawtex package in the editor
- Using the Lawtex package in the editor
1. Download the Editor (Sublime Text (ST) or VS Code)
What is an Editor?
Editors like Sublime Text and Visual Studio Code are tools offering many useful features for programmers, such as file searching, folder management, multi-point editing, and more. This is where you’ll write your code.
Downloading ST
To download Sublime Text, go to this site and download the latest version (currently version 4).
The installation works like any software—simply follow the default configurations and proceed until the installation is complete.
Downloading VS Code
To download VS Code, visit this site and download the latest version.
Follow the standard installation steps as you would for any other software.
2. Install the Lawtex Package
What is the Lawtex Package?
The Lawtex package contains the language logic and simplifies programming by adding color coding for different functionality groups and providing autocomplete options for some code snippets.
Installing in Sublime
a) First, download the Lawtex package.
For Sublime Text, click to download: lawtex.sublime-package.
b) Next, add the package to Sublime. Locate the Sublime packages folder on your computer and copy the downloaded file to that folder. Here’s how to find the correct folder on Windows and Mac OS.
Windows:
- Go to My Computer, open Local Disk (C:), then Program Files. Find the Sublime Text 3 folder and select Packages inside it. Paste the Lawtex package here:
Note: Admin access is required to paste the package into this folder. If you don’t have admin access, follow this alternative:
- Open Sublime, go to the Preferences menu, and click Browse Packages:
- In the folder that opens, go up one level to the Sublime Text 3 folder:
- Select the Installed Packages folder and paste the Lawtex package here:
Mac OS:
- In Finder, open the Applications folder, find Sublime Text, right-click on it, and select Show Package Contents:
- Navigate to Contents > Mac OS > Packages. Paste the Lawtex package here:
Installing in VS Code
For VS Code, go to “View” and then select “Extensions” (or use the shortcut Ctrl+Shift+X). Search for “Looplex” in the extension search bar within VS Code and install the extension.
3. Using the Lawtex Package in Sublime and VS Code
Now that you have an editor and the Lawtex package, using it is simple.
When creating a new file, select the “Lawtex” language in the bottom-right corner and save your file with the .lawtex extension, such as myFile.lawtex.
If you already have a file, check the bottom-right corner to ensure the correct package is applied. If needed, click there to change it: