Tooling
Here are a few hints that can enhance your coding experience with FatScript.
Source code formatting
Built-in support
You can apply auto-indentation to your sources using the following command:
fry -f mySweetProgram.fat
Visual Studio Code Extension
To add code formatter support to VS Code, you can install the fatscript-formatter extension. Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter:
ext install aprates.fatscript-formatter
fry
needs to be installed on your system for this extension to work
Syntax highlighting
Visual Studio Code Extension
To add FatScript syntax highlighting to VS Code, you can install the fatscript-syntax extension. Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter:
ext install aprates.fatscript-syntax
You can also find and install these extensions from the VS Code Extension Marketplace.
Nano Syntax File
To install FatScript's syntax highlighting for nano
, follow these steps:
- Download the
fat.nanorc
file from here. - Copy the
fat.nanorc
file to thenano
system directory:
sudo cp fat.nanorc /usr/share/nano/
If the syntax highlighting does not get automatically enabled, you may need to explicitly enable it in your .nanorc
file. Refer to the instructions in the Arch Linux Wiki for more information.
After installing the syntax highlighting, you can also use the code formatter in nano
with the following shortcut sequence:
- Ctrl+T Execute; and then...
- Ctrl+O Formatter
Other tips
Console file navigation
To navigate your project folders from the terminal, you can try using a console file manager such as ranger, paired with nano
. Set it as the default editor for ranger
by adding the following line to your ~/.bashrc
file:
export EDITOR="nano"