Basic Usage - nojanath/SublimeKSP GitHub Wiki

Basic Usage

  • Files with .ksp extension are automatically loaded with KSP syntax highlighting enabled. Files with .txt extension will do the same if the plugin succeeds at identifying it as a valid KSP script. Please note that the detection currently takes place when you open a file - not when you save it! There's some room for improvement here...

  • You can switch to KSP syntax highlighting by typing CmdShiftP (macOS) or CtrlShiftP (Windows), followed by "KSP" and Enter. Alternatively, you can use the drop-down menu in the bottom right of Sublime Text's status bar.

  • KSP-related actions and options are found in Tools > SublimeKSP menu, which will be displayed only when a valid KSP file is focused in Sublime Text.

  • Hit Tab to autocomplete the current variable or function name, or insert a snippet. Hit CmdSpace (macOS) or CtrlSpace (Windows) to show the autocomplete menu.

  • Hit CmdR (macOS) or CtrlR (Windows) in order to show an overview of the functions, families and callbacks. Start typing the name and press enter to jump to one of them.

  • Hit CmdK on macOS (or also F5 on Windows) in order to compile. The save_compiled_source pragma directive also accepts relative paths, which might be useful to know.

  • When you open a file, the plugin will examine the end-of-line characters and automatically normalize them if line endings were incorrect previously. It will not automatically save changes in this case, so if a newly opened file looks as if it has been modified, it's because of this type of automatic EOL normalization.

⚠️ **GitHub.com Fallback** ⚠️