Marat BN — Marat Borisovich Nepomnyashy's home page

Configuring SciTE as a Quick-Easy-Lightweight Programming Editor

Created on 2013-06-01

SciTE screenshot on Xfce

SciTE on Xfce

  • Background:

    Of the overwhelming number of programming text editors to choose from, SciTE is one of the best for quick and easy editing of single and multiple files on Unix / Linux / FreeBSD. It provides powerful IDE-like features without many of the inefficiencies and complexities of an IDE. If using Windows, then Notepad++, which shares the Scintilla code base with SciTE, is a good choice.

  • SciTE features:

    • Advantages over typical IDE issues:
      • Does not take long to start.
      • Does not require creating a project to edit a single file.
      • Does not have elaborate overly complex maze-like configuration settings and options.
      • Does not crash and/or hang.
      • Does not cost money.
    • IDE-like features:
      • Nice UI window.
      • Can have multiple files open in different tabs.
      • Can show line numbers in the margin.
      • Can wrap long lines without splitting them up.
      • Has status bar at the bottom that displays cursor position.
      • Allows tweaking indentation size when displaying tabs.
      • Can convert typed tabs to spaces, while leaving existing tabs the way they are.
      • Allows tweaking the number of spaces per tab when converting tabs to spaces.
      • Automatic indent on new line.
      • Can display symbols for different kinds of whitespace characters.
      • Supports indenting selected blocks of text.
      • Home key alternates between the first character and the first non-whitespace character.
      • Preserves cursor column position when moving between lines.
      • Recognizes many programming languages for syntax highlighting and color-coding.
      • Can fold/hide nested sections of source code.
      • Search / replace by regular expression.
  • Necessary configuration file:

    To make sure that certain font, indentation, and general useability settings mentioned above are enabled by default when SciTE starts up, it is necessary to set these settings in the SciTE configuration file ~/.SciTEUser.properties:

    # Show line numbers:
    line.margin.visible=1
    
    # Set tabs to 4 spaces:
    tabsize=4
    indent.size=4
    use.tabs=0
    
    # Show whitespaces:
    view.whitespace=1
    
    # Set monospaced font:
    font.base=$(font.monospace)
    font.small=$(font.monospace)
    font.comment=$(font.monospace)
    font.text=$(font.monospace)
    font.text.comment=$(font.monospace)
    font.embedded.base=$(font.monospace)
    font.embedded.comment=$(font.monospace)
    font.vbs=$(font.monospace)
    
    # open files in the last directory:
    open.dialog.in.file.directory=1
    
    # show all files:
    open.filter=$(all.files)Source Files (cpp,c,h,mak)|*.cpp;*.c;*.h;*.mak;makefile|Web Files (htm, html, css, xml, shtml, js, pl, asp)|*.html;*.htm;*.css;*.shtml;*.js;*.pl;*.xml;*.asp|Text (txt, doc)|*.txt;*.doc|
    
    # show status bar:
    statusbar.visible=1
    
    # show full path in the SciTE application window title bar:
    # (just the filename will remain in the tab caption)
    title.full.path=1
        

    Download .SciTEUser.properties, and place it into your home directory. Make sure to keep the dot in front of the filename.

    If SciTE is already open, then go to ‘Options’ -> ‘Open User Options File’, paste the settings in, and save.

    Note: This configuration file is coded for SciTE to insert 4 spaces per tab keystroke.

  • Additional resources:

    • Scintilla and SciTE official website.

      In most cases the OS package manager should be used to install SciTE.

      • On Ubuntu: sudo apt-get install scite
      • On Gentoo: sudo emerge app-editors/scite

    • My Favourite SCiTE settings
    • Super text editor SciTE configuration detailed examples
    • Another example configuration file for SciTE.
  • Conclusion:

    With this configuration file above, SciTE becomes a great quick / easy / lightweight programming and general text editor.

Creative Commons License

Copyright (c) 2010-2018 Marat Nepomnyashy

Except where otherwise noted, this webpage is licensed under a Creative Commons Attribution 3.0 Unported License.

Background wallpaper by Patrick Hoesly, used under Creative Commons Attribution 2.0 Generic License.