sued - the shut up editor
sued [file]
sued is a vector-oriented line editor, kind of similar to the venerable and standard ed text editor, just with a different command syntax and set, to provide a unique editing experience.
To be clear, it's a text editor that works on Rust's Vec
type. To be clearer, it's a text editor that works on lines and isn't graphical, like you're probably used to.
sued is available on crates.io - you can get it with cargo install sued.
Go to the GitHub page if you want to check out sued for yourself, or if you want to help me work on it.
The following options are available:
file - Specify the name of a file to read. If set, sued will store the file name.
You can view an asciinema demo showing sued in action.
This demo used to be embedded, but I couldn't get it to work right. Plus it kind of spoils the man page-ness of this website.
To run sued, simply run sued
at the command line.
Upon starting sued, you'll be greeted by the startup message.
$ sued
sued v0.16.0 - it's pronounced "soo-ed"
type ~ for commands, otherwise just start typing
Once you're here, you can just begin typing up your text file.
sued will automatically be pushing it onto the file buffer vector.
This text is
getting pushed
onto the file buffer!
If you want to look at your work so far, use the ~show
command.
Commands in sued are, by default, prefixed with ~. (though you can change that)
~show
1│This text is
2│getting pushed
3│onto the file buffer!
Saving is straightforward too. You just enter ~save filename
.
~save sued-test.txt
saved to sued-text.txt
Don't like how your commands are on the same line as the outputs? You can always set a ~prompt
.
~prompt sued>
sued> ~show
1│This text is
2│getting pushed
3│onto the file buffer!
Let's see if we can make a correction. We'll use the ~replace
command.
sued> ~replace 3
replacing line 3
original line is onto the file buffer!
into the file buffer vector!
replaced
sued> ~show
1│This text is
2│getting pushed
3│into the file buffer vector!
And that's all for this quick overview. Give sued a go and try it out yourself. The full command set awaits you down below.
sued supports command history. Use ↑ and ↓ to navigate through it.
All commands start with ~. Run ~ by itself to see a list of commands.
You can change sued's command prefix with ~prefix [prefix]. Replace ~ with your chosen prefix in this case.
KEY:
~command arg1/alt_arg2 [optional_arg] - what the command does
~about - display about text
~clear - clear buffer
~copy [line] - copy line or whole buffer to clipboard
~correct - replace most recent line (interactive)
~delete line/start [end] - immediately delete specified line or range of lines
~exit - exit sued
~help - display this list
~indent line level - indent a line, negative level will outdent
~insert line - insert text at specified line (interactive)
~nothing - do nothing with the buffer contents
~open [filename] - load file into buffer
~prefix [prefix] - set command prefix
~print [start] [end] - print the contents of the buffer without line numbers
~prompt [prompt] - set input prompt
~replace line - replace specified line (interactive)
~run command - run executable or shell builtin
~runhere command - run executable or shell builtin on file contents
~save [filename] - save buffer to file
~search term - perform regex search in the whole buffer
~show [start] [end] - display the contents of the buffer with line numbers
~substitute line pattern/replacement - perform regex substitution on the specified line
~swap source target - swap two lines
~write filename - write buffer to file without storing filename
I like ed. It's really nice, and the minimalism is really what sells it. I wanted to try my hand at writing a similar text editor, just a lot less complex.
Plus, I don't want to go insane trying to develop a Vim-like editor. Especially not when projects like Helix exist.
ed has a lot of commands, and like I said, I want sued to be more user-friendly.
Furthermore, sued inherits its command prefix (~) from my earlier project, Streakline.
It stands for "shut up editor," which alludes to how not-in-your-way it is.
"soo-ed". Don't pronounce it "sood," it's not a law thing, and has nothing to do with GitHub Copilot. (The context behind that statement is weird.)
Pfft. No. QVSED is a graphical editor with a completely different paradigm, and it isn't a sued replacement. It's just another project.
sued is still 0.x software and probably isn't going to replace VS Code anytime soon.
Plus, it's a line editor. If a text editor nowadays isn't kitted with a visual editing pane, thousands of keyboard shortcuts, an LSP client, auto-completion, syntax highlighting, code folding, and everything else VS Code users take for granted, it's deemed as "unusable" and "outdated" by novice programmers. In which case, sued probably isn't for them.
sued isn't a modern code editor, and it isn't trying to be. It's trying to be an unconventional line editor, and it doesn't give a damn if you're not comfortable with that.
Yes.