Skip to content
StarshipCaptainNemoPublic

About

HACKIT - A BASIC CODING DUDE'S EDITOR

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

Repository files navigation

HACKIT - A BASIC CODING DUDE'S EDITOR

HACKIT is a compact, keyboard- and mouse-driven text editor for the Windows console. It is written in FreeBASIC and designed primarily for BASIC source code, while also supporting a useful collection of text and web formats.

The editor combines a deliberately traditional console interface with modern editing conveniences such as multiple buffers, undo and redo, block selections, live Find and Replace, clipboard support, file completion, and include-aware definition lookup and identifier completion. Source files can be compiled and executed directly from the editor, while compiler errors are retained in a reusable log and provide navigable links to reported source lines.

Highlights

  • Multiple open buffers with cycling and a searchable buffer list
  • Linear selections and rectangular block editing across multiple rows
  • Mouse selection, multi-click selection, wheel scrolling, and scrollbar drag
  • Undo and redo with grouped typing history
  • Live Find and Replace with partial-text and whole-word modes
  • ONE, RNG, and ALL replacement scopes
  • Case-sensitive and case-insensitive matching
  • Interactive file browser with automatic, live-filtered completion
  • Single-line clipboard editing in Find, Replace, and prompt fields
  • Definition lookup through FreeBASIC source files and nested includes
  • Cached FreeBASIC syntax highlighting for .bas and .bi buffers
  • Bracket-pair validation with active-pair and missing-pair colors
  • Identifier and member completion, including nested WITH contexts
  • Automatic closing statements and indentation for block openers
  • Integrated compile-and-run command with navigable compiler diagnostics
  • Reusable read-only Log Page for the latest compiler output
  • UTF-8, UTF-16, and UTF-32 byte-order-mark detection
  • Insert and overwrite modes
  • Configurable console colors and editor symbols
  • Built-in read-only manual, changelog, and license views

Requirements

HACKIT currently targets 64-bit Windows and uses the Windows console API.

To build it from source, install:

  • FreeBASIC with the 64-bit compiler
  • PowerShell

The supplied build script currently expects the compiler at:

D:\Coding\Tools\FreeBASIC\fbc64.exe

If FreeBASIC is installed elsewhere, change that path in buildit.ps1.

Quick start

Using a release

Download the Windows x64 release ZIP and keep these files together:

hackit.exe
hackit-help.txt
changelog.md
README.md
LICENSE.TXT

The local identifier cache is created beside the executable after you use Ctrl+Shift+I for a buffer with includes.

Start the editor:

.\hackit.exe

Open one or more files directly:

.\hackit.exe example.bas windows.bi notes.txt

The startup files are opened as separate buffers. Use Ctrl+Tab to cycle through them or Ctrl+B to select one from the buffer list.

Building from source

Open PowerShell in the project directory and run:

New-Item -ItemType Directory -Force build | Out-Null
.\buildit.ps1

The resulting files are placed in build\:

build\hackit.exe
build\hackit-help.txt
build\changelog.md
build\README.md
build\LICENSE.TXT

The build script generates snapshotid.bi before compilation and embeds the next available daily build identifier in the executable. When no legacy build index is available, it reuses an author suffix from the existing build or the latest author-tagged build archive. If neither contains one, it asks for an identifiable author name and creates an ID such as 20260906-1-authorname.

When the existing build is exactly one daily index ahead of the latest source checkpoint, repeated runs rebuild it in place with the same build ID. After a matching source checkpoint exists, the next run packages that build as build\archive\hackit-<build-id>-windows-x64.zip, removes its loose runtime files, and advances to the next build ID. Without a source checkpoint, each run retains the previous behavior of archiving the existing build and creating a new ID.

The script invokes:

D:\Coding\Tools\FreeBASIC\fbc64.exe

Edit the compiler path in buildit.ps1 when FreeBASIC is installed elsewhere. Run the script from the project directory so the source, generated identifier, manual, changelog, license, and output directory resolve together.

The author suffix keeps independently produced executables distinguishable from original HACKIT builds. Changes to the source code must also be annotated with an identifiable author name so modifications remain attributable.

Command-line options

Command Description
hackit.exe [file ...] Open one or more files, or start with an empty UTF-8 buffer
hackit.exe --help Open the complete manual inside HACKIT
hackit.exe --version Print the program and build identifier
hackit.exe --changelog Open the installed changelog inside HACKIT
hackit.exe --license Open the installed GPL license inside HACKIT

The help aliases -h, -?, /h, and /? are also accepted.

Essential controls

Keys Action
F1 Open the built-in manual
F10 Open the compiler Log Page
Ctrl+N Create a new buffer
Ctrl+O Open a file in a new buffer
Ctrl+Shift+O Replace the current buffer with another file
Ctrl+S Save the current buffer
Ctrl+Shift+S Save all buffers
Ctrl+E Open the Execute Command prompt
Ctrl+Q Close the current buffer
Ctrl+Shift+Q Close all buffers and exit
Ctrl+Tab Cycle through open buffers
Ctrl+B Open the buffer list
Ctrl+Z / Ctrl+Y Undo or redo
Ctrl+X / Ctrl+C / Ctrl+V Cut, copy, or paste
Ctrl+F Open Find
Ctrl+R Open Find and Replace
Ctrl+G Go to a line
Ctrl+D Find a definition
Ctrl+I Toggle identifier completion for the active buffer
Alt+S Toggle linear and rectangular selection
Insert Toggle insert and overwrite mode

Hold Shift while navigating to create or extend a selection. Mouse dragging selects text; double-click selects a word, triple-click selects a line, and a fourth consecutive click selects the complete document.

See hackit-help.txt for the complete reference.

Editing assistance

With identifier completion enabled, pressing Space immediately after a supported block opener inserts its matching closing statement before the next nonblank line at the same or a lower indentation level. Pressing Enter after an opening statement indents the next line one level further when needed. Ordinary line continuations retain their inherited indentation.

In Insert mode, Space or Tab shifts a multiline rectangular selection right without clearing it. Backspace shifts it left, while Shift+Tab dedents every row spanned by a multiline linear or rectangular selection. Other typed characters are inserted at the left edge of every selected row. Starting a rectangular selection with Shift+Up or Shift+Down creates a visible one-column-wide block.

Run and compiler output

Ctrl+E opens the EXECUTE COMMAND prompt. The case-insensitive RUN command saves the active buffer, asking for a filename when necessary, then compiles it with FreeBASIC beside the source file. HACKIT runs the temporary executable, restores its console state afterward, and deletes the executable. If no compiler is available through PATH or a remembered location, HACKIT asks for the compiler executable.

Compiler output is captured without replacing the editor display. Multiline failure output appears in a scrollbox with up to 15 visible rows. Use Up, Down, PageUp, PageDown, Home, and End to navigate. Left and Right move the initially right-aligned scrollbox to the corresponding screen edge. Enter on a diagnostic with a valid line number selects that source line without closing the scrollbox; Escape closes it.

The latest compiler output is also retained in one read-only Log Page. Press F10 to open it; repeated presses reuse the existing buffer. The built-in manual and changelog similarly use read-only buffers titled HELP and CHANGELOG.

Find and Replace

Find and Replace runs live while the editor remains visible:

  • Ctrl+F opens Find-only mode.
  • Ctrl+R opens the dual Find and Replace interface.
  • Without a preselection, Ctrl+R focuses Find.
  • With a valid single-line preselection, Ctrl+R starts in Replace.
  • Tab switches between the Find and Replace fields.
  • Alt+F toggles partial-text and whole-word matching.
  • Alt+C toggles case sensitivity.
  • Alt+R changes the replacement scope.
  • Enter commits a replacement and Escape cancels its live preview.

A multiline linear or block selection can become a saved replacement range. While Find has focus, double-clicking a word in the editor replaces the current Find input with that word.

File browser

Typing in a file prompt automatically opens and filters the completion list. Use Up and Down to navigate; the input field follows the selected entity. Press Tab or Enter to accept it, or Escape to close the list and clear the input.

With an empty input field, Tab opens the complete unfiltered list. Opening a filename that does not exist creates a named empty buffer, but no filesystem entry is created until the buffer is deliberately saved.

Supported file types

The interactive file browser accepts:

.bas  .bi   .txt  .ps1  .ini  .md   .xml
.htm  .html .css  .js   .php

Files without a recognized byte-order mark are treated as ASCII. Tab characters are expanded to configured tab stops while loading.

Syntax highlighting is enabled only for nonempty, named .bas and .bi buffers. It distinguishes comments, preprocessor commands, types, strings, numbers, operators, structural characters, keywords, native identifiers, and user identifiers. Bracket pairs are checked outside strings and comments.

Identifier completion is toggled per buffer with Ctrl+I. Built-in and declared identifiers are matched after three characters, while typing . after a variable with a known user-defined type lists that type's members immediately. Inside WITH Variable ... END WITH, a leading . uses the innermost active WITH variable, including correctly nested blocks. Exact matches are preferred before longer prefix matches. Included declarations are loaded lazily from the matching section of hackit-identifier-cache.txt beside the executable. Cache sections are scoped to the active buffer's direct includes and reused across buffer switches without exposing unrelated names. This generated local cache is not part of the repository. After defining a new include, use Ctrl+Shift+I to build or update the active include section; this also creates the cache file when it does not exist. Escape cancels rebuilding and retains the previous cache. Ordinary typing and editing never crawl include files.

Project layout

hackit.bas          Main FreeBASIC source
hackit-help.txt     Complete in-editor manual
snapshotid.bi       Build identifier included by the source
buildit.ps1         Build automation
LICENSE.TXT         GNU General Public License version 3
changelog.md        Development history

Generated executables and their accompanying runtime files are placed under build\. The untracked hackit-identifier-cache.txt is generated beside the executable when Ctrl+Shift+I first builds an include-cache section.

See changelog.md for the complete development history.

Project status

HACKIT is an actively developed personal project. Its interface and shortcuts may continue to evolve as new workflows are tested and refined.

License

Copyright (C) 2026 StarshipCaptainNemo.

HACKIT is free software licensed under the GNU General Public License version 3 or later. It is distributed without any warranty; see LICENSE.TXT for the complete terms.

About

HACKIT - A BASIC CODING DUDE'S EDITOR

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages