Skip to content

Latest commit

 

History

History
291 lines (189 loc) · 18.2 KB

api_files.md

File metadata and controls

291 lines (189 loc) · 18.2 KB

Back

Built-in languages

These languages are recognized by SciTE and enabled by default:

Ada, Assembler (NASM, MASM), AutoIt, Batch files (MS-DOS), Bash, C/C++/C#, conf (Apache), CSS, D, diff files, Flash (ActionScript), Fortran, Gettext, Go, HTML, HTML with embedded JavaScript, VBScript, PHP and ASP, IDL, MSIDL, XPIDL, INI, Java, JavaScript, LISP, Lua, Make, Matlab, MSSQL, Objective C, Objective Caml, Octave, Pascal/Delphi, Perl, PostScript, Python, Registry, Ruby, Scheme, SQL and PLSQL, S-Record, Swift, Tcl/Tk, Vala, Visual Basic, XML, and YAML

API Files and properties

  • C, C++

  • JavaScript, CSS, web

  • AMPL

  • APDL

  • ASP

    • ASP API methods
    • Edit html.properties to set the language of scripts in ASP code
      • If asp.default.language=1, script in an ASP code block is JavaScript
      • If asp.default.language=2, script in an ASP code block is VBScript
      • If asp.default.language=3, script in an ASP code block is Python
  • Asymptote

  • Auto Hotkey

  • Auto It3

  • Batch Scripting (Windows)

    • Batch API Files (API files for NT, XP/2003, GNUWin32 and SysInternals commands)
  • C#

  • CIL

  • Clojure

  • CMake

  • FORTRAN

  • Java

  • Lua

  • Microsoft SQL

  • nncron

  • Octave

  • Oracle

  • OScript

  • Pascal / DelphiAPI

  • Perl

  • PHP

  • POV-Ray

  • Progress

  • Python

  • Ruby

  • TADS3

  • Visual Basic

  • Windows Scripting

  • Others

    • The following languages have built-in support that is disabled by default, and can be enabled in an options file.

    • For example, the line imports.include=verilog latex in an options file enables these two languages.

    ASN.1 MIB: From the Options menu choose "Open User Options File". Type imports.include=asn1 and save.
    Abaqus: From the Options menu choose "Open User Options File". Type imports.include=abaqus and save.
    Asl (ACPI Source): From the Options menu choose "Open User Options File". Type imports.include=asl and save.
    Avenue (Ave): From the Options menu choose "Open User Options File". Type imports.include=ave and save.
    AviSynth: From the Options menu choose "Open User Options File". Type imports.include=avs and save.
    Baan: From the Options menu choose "Open User Options File". Type imports.include=baan and save.
    BlitzBasic: From the Options menu choose "Open User Options File". Type imports.include=blitzbasic and save.
    Bullant: From the Options menu choose "Open User Options File". Type imports.include=bullant and save.
    COBOL: From the Options menu choose "Open User Options File". Type imports.include=cobol and save.
    CSound: From the Options menu choose "Open User Options File". Type imports.include=csound and save.
    Coffeescript: From the Options menu choose "Open User Options File". Type imports.include=coffeescript and save.
    E-Script: From the Options menu choose "Open User Options File". Type imports.include=escript and save.
    Ecl: From the Options menu choose "Open User Options File". Type imports.include=ecl and save.
    Eiffel: From the Options menu choose "Open User Options File". Type imports.include=eiffel and save.
    Erlang: From the Options menu choose "Open User Options File". Type imports.include=erlang and save.
    Flagship: From the Options menu choose "Open User options File". Type imports.include=flagship and save.
    Forth: From the Options menu choose "Open User Options File". Type imports.include=forth and save.
    Freebasic: From the Options menu choose "Open User Options File". Type imports.include=freebasic and save.
    GAP: From the Options menu choose "Open User Options File". Type imports.include=gap and save.
    Haskell: From the Options menu choose "Open User Options File". Type imports.include=haskell and save.
    InnoSetup: From the Options menu choose "Open User Options File". Type imports.include=inno and save.
    Intel HEX: From the Options menu choose "Open User Options File". Type imports.include=hex and save.
    JSON, JSON-LD: From the Options menu choose "Open User Options File". Type imports.include=json and save.
    KiXtart: From the Options menu choose "Open User Options File". Type imports.include=kix and save.
    LOT: From the Options menu choose "Open User Options File". Type imports.include=lot and save.
    Lout: From the Options menu choose "Open User Options File". Type imports.include=lout and save.
    MMIXAL: From the Options menu choose "Open User Options File". Type imports.include=mmixal and save.
    Metapost: From the Options menu choose "Open User Options File". Type imports.include=metapost and save.
    Modula 3: From the Options menu choose "Open User Options File". Type imports.include=modula3 and save.
    NSIS: From the Options menu choose "Open User Options File". Type imports.include=nsis and save.
    Nimrod: From the Options menu choose "Open User Options File". Type imports.include=nimrod and save.
    OScript: From the Options menu choose "Open User Options File". Type imports.include=oscript and save.
    Opal: From the Options menu choose "Open User Options File". Type imports.include=opal and save.
    POV-Ray: From the Options menu choose "Open User Options File". Type imports.include=pov and save.
    PostScript: From the Options menu choose "Open User Options File". Type imports.include=ps and save.
    PowerPro: From the Options menu choose "Open User Options File". Type imports.include=powerpro and save.
    PowerShell: From the Options menu choose "Open User Options File". Type imports.include=powershell and save.
    PureBasic: From the Options menu choose "Open User Options File". Type imports.include=purebasic and save.
    R: From the Options menu choose "Open User Options File". Type imports.include=r and save.
    Rebol: From the Options menu choose "Open User Options File". Type imports.include=rebol and save.
    Rust: From the Options menu choose "Open User Options File". Type imports.include=rust and save.
    SORCUS Installation: From the Options menu choose "Open User Options File". Type imports.include=sorcins and save.
    Smalltalk: From the Options menu choose "Open User Options File". Type imports.include=smalltalk and save.
    Specman E: From the Options menu choose "Open User Options File". Type imports.include=specman and save.
    Spice: From the Options menu choose "Open User Options File". Type imports.include=spice and save.
    TACL: From the Options menu choose "Open User Options File". Type imports.include=tacl and save.
    TAL: From the Options menu choose "Open User Options File". Type imports.include=tal and save.
    TeX, LaTeX: From the Options menu choose "Open User Options File". Type imports.include=latex and save.
    VHDL: From the Options menu choose "Open User Options File". Type imports.include=vhdl and save.
    Verilog: From the Options menu choose "Open User Options File". Type imports.include=verilog and save.
    cmake: From the Options menu choose "Open User Options File". Type imports.include=cmake and save.
    nnCron: From the Options menu choose "Open User Options File". Type imports.include=nncrontab and save.
    scriptol: From the Options menu choose "Open User Options File". Type imports.include=scriptol and save.
    txt2tags: From the Options menu choose "Open User Options File". Type imports.include=txt2tags and save.

To contribute a file to this list, send an e-mail to scitewiki at gmail dot com or submit a pull request.

How to install a properties file

  • Properties files can change colors and fonts, specify lists of keywords, define what action to take on "Compile" and "Go", map file extensions to a programming language, and more

  • In Windows, move the .properties file into the directory that contains SciTE.exe

  • In Linux, move the .properties file into the directory that contains SciTEGlobal.properties. This is typically either /usr/bin/scite or /usr/local/bin/scite

  • By default, SciTEGlobal.properties includes the line import *, and so the new .properties file will be included

How to install an api file and enable calltips + completion

  • As an example, let's set up the api file for C

  • Download and uncompress c_withdoc.zip

  • In Windows, move c_withdoc.api into the directory that contains SciTE.exe

  • In Linux, move c_withdoc.api into the directory that contains SciTEGlobal.properties. This is typically either /usr/bin/scite or /usr/local/bin/scite

  • Open SciTE

  • From the Options menu, select Open User Options File

  • Add the line api.$(file.patterns.cpp)=$(SciteDefaultHome)/c_withdoc.api

  • Save this file and restart SciTE

  • In SciTE, create and open a new file "test.c"

  • Calltips

    • Type the text "fputs("

    • As soon as you press (, a calltip appears, showing a description of fputs

  • Completion

    • On an empty line, type the text "fp" and press Ctrl+Space

    • A listbox appears allowing you to choose between fprintf, fputc, and fputs

    • You can use the arrow keys can navigate this box and Enter to choose an item from this box

How to make an api file

An api file is a plain text file with one entry per line.

To generate api files for your own source code, one of these tools may be helpful:

  • For C/C++ headers, an api file can be generated using ctags and then the tags2api Python script (which assumes C/C++ source) on the tags file to grab complete multiple line function prototypes. Some common headers surround parameter lists with a __P macro and may have comments. The cleanapi utility may be used on these files
  • For Python modules, there is a gen_python script
  • For Python 3, there is a gen_python_3 script
  • For Java classes, there is a ApiBuilder.java program
  • For C# classes, use genapi.cs
  • For PHP, use php-api-generator or phpapi.php

Search for "calltip" in the SciTE Documentation for more information about calltips.