Nib

A small Windows rip off of 'nano'

I have always wanted a CLI text editor like 'nano' for Windows - and yes, I know there is nano for Windows - but I figured, what's the fun in that? Also, isn't impersonation the purest form of flattery?

So, I put on my vide-coding shoes and got to work on a super minimal text editor for the CLI in Windows. Mostly I just wanted an editor to edit config files and not open Notepad++ or VS Code - it's too much overhead. I also wanted nano and Windows (CUA) key bindings. Some days I feel like Ctrl+C and Ctrl+V and other days I mix it up with Ctrl+K and Ctrl+U. Nib will honor Ctrl+X to quit - but only if there is no active selection. You can also quit with Ctrl+Q.

Behold, Nib - your lightweight, fast, CLI editor for Windows:

[SCREENSHOT]

The only other nice features it has is syntax highlighting for about a dozen file formats.

Highlighting covers 16 languages using real VS Code grammars — JSON, YAML, TOML, INI, XML, Markdown, SQL, Python, JavaScript, TypeScript, TSX, Rust, Go, Bash, PowerShell and Batch. Language is detected from the extension, the filename, or a shebang.

Other than that - you can scroll, edit, select, copy/cut & paste to your hearts content. I will add in other features as I use it each day. If you have any suggestions, drop a line, or open a pull request. Cheers!

Keys
Arrows / Home / End / PgUp / PgDn Move
Ctrl+arrows Move by word
Shift+move Select
Esc Clear the selection
Ctrl+A Select all
Ctrl+C / Ctrl+X / Ctrl+V Copy / cut / paste
Ctrl+K / Ctrl+U Cut line / paste line
Ctrl+Z / Ctrl+Y Undo / redo
Ctrl+S or Ctrl+O Save
Ctrl+Q Quit
Ctrl+X Cut, or quit with no selection
Ctrl+G Go to line
Ctrl+H Help
Alt+T Cycle theme
Alt+N Toggle line numbers

You can find the code and release here: GitHub