Skip to content

Repository files navigation

notispf

A text editor inspired by the ISPF editor from z/OS mainframes, available as a terminal app on all platforms, a desktop GUI on Linux and Windows, and a native Swift app on macOS. Brings the prefix command area that ISPF users know and love to Linux, macOS, and Windows.

Installation

Download (no Python required)

Go to the Releases page and download for your platform:

PlatformGUITerminal CLI
Linuxnotispf-qt-x86_64.AppImagenotispf-linux
macOSnotispf-v1.0.dmgnotispf-macos
Windowsnotispf-qt-setup.exenotispf-windows.exe

Linux AppImage:

chmod +x notispf-qt-x86_64.AppImage
./notispf-qt-x86_64.AppImage myfile.txt

macOS Native App (v1.0):

Download notispf-v1.0.dmg from the v1.0-mac release, open the DMG, and drag notispf.app to your Applications folder. Then launch it from Applications or Spotlight.

macOS note: If macOS shows a security warning on first launch, right-click the app → OpenOpen to bypass Gatekeeper. The app is signed with a Developer ID certificate.

macOS Terminal CLI note:xattr -d com.apple.quarantine ./notispf-macos

Windows installer: Run notispf-qt-setup.exe. Creates a Start Menu entry and an optional desktop shortcut.

Windows note: SmartScreen may warn about an unknown publisher. Click More infoRun anyway.

Linux / macOS CLI:

chmod +x notispf-linux # or notispf-macos
./notispf-linux myfile.txt
mv notispf-linux ~/.local/bin/notispf # optionally add to PATH

Arch Linux / Endeavour OS / Manjaro (pacman)

A PKGBUILD is provided in packaging/PKGBUILD. It installs the pre-built binary and registers it with pacman so upgrades and removal work normally.

curl -O https://raw.githubusercontent.com/mrthock/notispf/main/packaging/PKGBUILD
makepkg -si

Or if you already have the repo cloned:

cd packaging
makepkg -si

To uninstall:

pacman -R notispf

Via pip

pip install notispf # terminal version
pip install notispf[qt] # terminal + GUI (requires PyQt6)

From source

git clone https://github.com/mrthock/notispf
cd notispf
pip install -e .# terminal version
pip install -e ".[qt]"# terminal + GUI

Usage

macOS Native App:

Launch notispf.app from Applications or Spotlight.
Use File → Open (Cmd+O) to open a file, or pass a path as an argument from the terminal.

GUI (PyQt6):

notispf-qt <file>
notispf-qt # opens a file picker dialog

Terminal:

notispf <file>

Screen Layout

 notispf filename.txt Line 1/42 Col 1
===> _
000001|This is the first line of your file
000002|Second line here
000003|Third line
|~
|~
F1-HELP F3-SAVE F5-RFIND F6-CMD F7-UP F8-DOWN F10-LEFT F11-RIGHT F12-QUIT
[message bar]
  • Status bar (top row) — filename, modified flag [+], current line/total, cursor column, [HEX] when hex mode is active
  • Command bar (second row) — always visible; type commands here after pressing F6 to focus it
  • Prefix column (left, 6 chars) — shows zero-padded line numbers; type prefix commands here
  • Text area (right of |) — edit your file
  • Function key bar (second-to-last row) — always-visible reference for function key shortcuts
  • Message bar (bottom row) — status messages and feedback

Navigation

KeyAction
Arrow keysMove cursor in text
Up (from top visible line)Move to command bar
Page Up / Page DownScroll
HomeFocus command bar
Ctrl+ABeginning of line
End / Ctrl+EEnd of line

Switching Between Areas

FromKeyTo
TextHomeCommand bar
TextTabPrefix column of next line (N+1)
Text (col 0)Left arrowPrefix column of same line
Text (top line)Shift+TabCommand bar
Text (any other line)Shift+TabPrefix column of previous line (N-1)
PrefixRight arrowText area of same line (col 0)
PrefixHomeCommand bar
PrefixTabText area of same line
PrefixShift+TabText area of previous line (N-1)
Command barTabPrefix area of line 1
Command barDown arrowText area (cursor position preserved)
Command barEscapeText area (cursor position preserved, bar stays visible)

Prefix Commands

Type a command into the prefix column, then press Enter to execute. You can stage commands on multiple lines before pressing Enter — they all execute at once.

Single-Line Commands

CommandAction
DDelete line
DnDelete n lines (e.g. D5 deletes 5)
IInsert blank line after
InInsert n blank lines
RRepeat line
RnRepeat line n times
CCopy line to clipboard
CnCopy n lines to clipboard
MMove line (cut to clipboard)
MnMove n lines
APaste clipboard after this line
BPaste clipboard before this line
OOverlay clipboard onto this line (merge; clipboard spaces don't overwrite)
OnOverlay clipboard onto n lines
>nIndent right n columns (e.g. >4 adds 4 spaces)
<nIndent left n columns (removes up to n leading spaces)
HEXReplace this line with its hex representation
HEXBInsert a hex copy of this line below it
HEXAConvert a hex line back to ASCII text
UCUppercase this line
UCnUppercase n lines (e.g. UC3)
LCLowercase this line
LCnLowercase n lines

Block Commands

Type the command on the first line of the block, then again on the last line.

CommandAction
DDDelete block
CCCopy block to clipboard
MMMove block (cut to clipboard)
RRRepeat block (insert a copy below)
OOOverlay clipboard onto block (merge clipboard text into block lines)
>>nIndent block right n columns
<<nIndent block left n columns

Use A, B, or O/OO on a third line to place the clipboard after copying or moving.

Example — move lines 3–6 to after line 10:

  1. Tab to line 3 prefix → type MM
  2. Arrow down to line 6 → type MM
  3. Arrow down to line 10 → type A
  4. Press Enter

Exclude / Show Commands

CommandAction
XExclude line from display (collapse into fold row)
XnExclude n lines
SShow (un-exclude) line or the entire fold group it belongs to
SnShow n lines
XXExclude block
SSShow block

Excluded lines are collapsed into a single fold row showing the count. Use SHOW ALL on the command line to reveal everything at once.

Prefix Mode Controls

KeyAction
EnterExecute all staged prefix commands
EscapeCancel all staged commands and exit prefix mode
↑ / ↓Move between lines (keeps staged commands)

Command Line

The command bar is always visible just below the status bar. Press F6 to focus it (the cursor moves to ===>), type a command, and press Enter to execute. After the command runs the input clears, the result appears in the message bar, and the cursor stays at ===> ready for another command. Press Escape or Down arrow to return to the text. Press F6 again while focused to hide the bar entirely; press F6 once more to bring it back.

File Commands

CommandAction
SAVESave file
FILESave and exit
CANCEL or QUIT or CANExit without saving

Copy File

CommandAction
COPY filenameSave a copy of the current file to filename (current file path unchanged)

Undo / Redo

CommandAction
UNDOUndo last change
REDORedo last undone change

Hex Mode

CommandAction
HEX ONConvert entire file to hex (e.g. Hello48 65 6C 6C 6F)
HEX OFFConvert hex back to text

[HEX] appears in the status bar while hex mode is active. HEX ON and HEX OFF each count as a single undo step.

Exclude and Delete

EXCLUDE 'pattern'
EXCLUDE 'pattern' ALL
EXCLUDE 'pattern' n
DELETE 'pattern'
DELETE 'pattern' ALL
DELETE 'pattern' n
DELETE X ALL
DELETE NX ALL
  • EXCLUDE 'pattern' — exclude the next matching line from display
  • EXCLUDE 'pattern' ALL — exclude all matching lines
  • EXCLUDE 'pattern' n — exclude the next n matching lines
  • DELETE 'pattern' — delete the next matching line
  • DELETE 'pattern' ALL — delete all matching lines
  • DELETE X ALL — delete all currently excluded lines
  • DELETE NX ALL — delete all non-excluded lines

Show

CommandAction
SHOW ALLReveal all excluded lines

Display

CommandAction
COLSToggle the column ruler on/off
CLEAR / RESET / RESClear the current search highlight
HELPOpen the help screen
HILIGHT OFFDisable syntax highlighting (default)
HILIGHT ONEnable syntax highlighting, language detected from file extension
HILIGHT <language>Force a specific language (e.g. HILIGHT JCL, HILIGHT REXX, HILIGHT COBOL, HILIGHT SQL, HILIGHT PYTHON)

Syntax highlighting is powered by Pygments. For a full list of supported language names, see the Pygments lexer list.

Find and Change

FIND 'text'
CHANGE 'old' 'new'
CHANGE 'old' 'new' ALL
CHANGE 'old' 'new' ALL .labelA .labelB

Both single and double quotes are accepted as delimiters.

Aliases: F for FIND, C for CHANGE, CAN for CANCEL, RESET/RES for CLEAR.

  • FIND — locate next occurrence (case-insensitive by default)
  • CHANGE — replace next occurrence
  • CHANGE ... ALL — replace all occurrences in file
  • CHANGE ... ALL .A .B — replace all occurrences between labeled lines

Labels

Type .A, .B etc. in the prefix column to assign a label to a line. Labels are used to define ranges for CHANGE ... ALL .A .B.

Function Keys

KeyAction
F1Help
F3Save and exit
F5Repeat last FIND (RFIND)
F6Focus command bar (or hide it if already focused)
F7 / Page UpScroll up
F8 / Page DownScroll down
F10Scroll left
F11Scroll right
F12Exit without saving
Ctrl+ZUndo last change
Ctrl+YRedo last undone change

Contributing

notispf is designed to be easy to extend. Adding a new prefix command takes three steps:

  1. Write a handler function in notispf/commands/line_cmds.py:
defcmd_trim(buffer: Buffer, line_idx: int, count: int) ->EditorResult:
foriinrange(line_idx, min(line_idx+count, len(buffer))):
buffer.replace_line(i, buffer.lines[i].text.rstrip())
returnEditorResult(success=True)
  1. Register it in the same file's register() function:
registry.register_line_cmd(CommandSpec("T", cmd_trim, description="Trim trailing whitespace"))
  1. Add tests in tests/test_line_cmds.py.

That's it — no changes to the prefix state machine, display, or app controller needed.

See ARCHITECTURE.md for a deeper overview of the codebase.

License

MIT

About

A terminal text editor inspired by the ISPF editor from z/OS

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages