MorningStar

Here's the vim script that this is about.

Having spent years trying to get the hang of Vim and failing, it was time to give up and try something new. The sprawling nature of vim makes it for me borderline unusable, a problem I have with a lot of complex stuff. Some love having a billion different key combinations that allows you to do exactly what you want with the absolute minimum amount of input but I like simple things and would want something more tractable that I can actually become proficient at, even it requires punching in more key strokes.

What I was looking for was something with a more manageable set of commands that would be easier to memorize. Perusing the wikipedia list of text editors eventually led to WordStar by way of Joe. Joe being an editor that claims inspiration from WordStar but does away with one of the main selling point of it, namely the "diamond" cluster of movement keys. You can start Joe in a WordStar mode but it makes some trade-offs that I didn't like.
WordStar I remembered from an article I'd happened across ages ago by Robert J. Sawyer. In it he argues convincingly for the benefits WordStar, which I won't go into here as it's better you just read it yourself.
WordStar itself is of course stone dead, having had it's last update in '99. It attained some popularity but there aren't a whole lot of modern projects trying to recreate it. One called WordTsar I couldn't get to work and there's a fork of Vim called VimStar that tries emulate it but it felt a little too much.
Both of them are also modeless, like the original WordStar and I specifically wanted a modal editor as they obviate the need to constantly be holding down a modifier key. Editing commands like moving the cursor or copying text almost always end up being multiple keystrokes and so it's easier to just press a key once to go into command mode and then once again to go out of it rather than holding one key down during all the other key presses. I have no idea why modal editors aren't the norm. The only one really available appears to be Vim or Vim-like.
So I've maintained modality for this script. Keeping the same key-combos as in WordStar but without the need to be holding Ctrl.

Getting a proven workflow was also important. You could potentially produce a more efficient set of keybindings but it would involve a lot of trial and error and who has the time to constantly try out new keybindings one can't develop muscle memory for? Creating one's own snowflake Vim key config also isn't going to prove interesting for anyone, possibly not even oneself. The good thing about using an older piece of tech is that you can lean on it's history and of course there's the delicious contrarianism in reviving a 40 year old program that hearkens back to a sweeter time before this foul age of mechanized proliferation and universal blight.

Having to use Vim means you can't make a perfect recreation of WordStar as there has to be certain concessions to the internals of Vim and I wanted this to be a quick and dirty project so I won't be fighting with Vim to try and make things 100% accurate. It's intended for programming and not for prose so I've dispenced with WordStar features that isn't useful for programming. A lot of suggestions I've stolen from this Usenet post by Thomas Köhler.
Using Vim as a basis is also great as it's such a stable platform with tons of customizability.

I'm still not entirely sure if I'll stick with this. So far I really like it but I guess if it doesn't work out I can always go back to being shite at Vim.
Project's name is taken from a common name for the planet Venus, which isn't an actual star but often mistaken for one.

Keys Action Vim mapping Notes
Ctrl-Space Toggles between insert and normal mode. Esc and i What I wanted was a single key to toggle between Vim's normal and input modes. Esc can't be used as Esc is sent during startup of Vim by the terminal or something, so then it'll go into insert mode and garbage will be printed to the document every time Vim is started. Capslock would have been the best option as it's right next to your pinkie but it can't be mapped by Vim.
Best option of a bad lot I felt was to use Ctrl-Space, it's easy to input though being a two key combination isn't great.
BASIC MOVEMENT
s Move cursor left one character. h If you keep pressing s in WordStar after reaching the beginning of a line the cursor will jump to the above line. In Vim it stops at the beginning of that line.
d Move cursor right one character. l Ibid.
e Move cursor up one line. gk
x Move cursor down one line. gj
a Move cursor back one word. b
f Move cursor forward one word. w WordStar would place the cursor at the beginning of the word just like pressing w would. However if it was the last word of the line the next press would position the cursor at the end of that word. Code for how to emulate this behavior was taken from a stackexchange post by DjMcMayhem.
r Move cursor up half a page. Ctrl-u zz WordStar would move the cursor up almost a full page. 18 lines out of a pages total of 20 but with modern screens holding over twice that amount of lines, scrolling half a page seemed more reasonable. zz because centering the screen makes following along with the scrolling easier.
c Move cursor down half a page. Ctrl-d zz Ibid.
w Scroll the screen up one line without moving the cursor until it reaches the bottom of the screen. Ctrl-y
z Scroll the screen down one line without moving the cursor. Ctrl-e
qs Move cursor the beginning of the line. g0
qd Move cursor the the end of the line. g$ l to move the cursor one space beyond the last word on the line and not just to the last letter of that word. Requires "set virtualedit=onemore" for Vim to allow for this.
qe Move cursor to the top of the screen. H
qx Move cursor to the bottom of the screen. L
qw Move cursor one paragraph up. { In WordStar this command initiated an auto-scrolling feature where the cursor would automatically scroll the screen up continually until interrupted. I never saw a point to this so I placed here what I considered a more useful command, namely to move up one paragraph.
qz Move cursor one paragraph down. } Ibid.
qr Move cursor to the beginning of the document. gg
qc Move cursor to the end of the document. G
qp Move cursor to the position it was in before executing the previous command. ``
i Prompts for a line number then goes to that line. : Not originally in WordStar, I took it from a suggestion by Thomas Köhler as I had no better idea of where to put this.
EDITING
g Delete characters to the right of the cursor. i<Del><Esc>`^ Going into insert mode and doing the delete was the easiest way to emulate WordStar behavior. Weird characters after escape is to position the cursor correctly.
h Delete character to the left of the cursor. i<BS><Esc>`^ Ibid.
t Delete word the right of the cursor. dw
y Delete line. dd
qy Delete the whole line to the right of the cursor. d$
qt Delete the whole line to the left of the cursor. d0
n Insert new line. o
u undo... sort of. P Back in the halcyon days of DOS there wasn't enough RAM to implement modern style undo with 1000 possible reverts. Instead undo only applied to the latest command on larger text chunks. Namely the commands y, t, ky, qt and qy.
The twist being that this isn't actually an undo command and the deleted text will be restored at the cursor position, making it a paste command where you can't copy the text you intend to paste, only delete it. This command then also doubled as a quick way of copying or moving words and lines around. E.g. if you want to copy a line to some other part of the document you'd first delete it with 'y', right away paste it back with 'u', move to some other part of the document and again paste it with 'u'. A way of 'dd'ing a line like in Vim essentially. Lacks a way of 'yy'ing one though but it's not much of a hassle.
As for getting back single deleted charactes, that wasn't considered all that necessary. To quote Walter Ettlin in the book "WordStar 5.5 Made Easy":
"It does not restore single characters deleted using the DEL and BACKSPACE key. Those can be undone more easily by reentering them."
Not sure about that but those were different times.
Backspace Actual undo u Modern undo functionality is a pretty nice feature though, so I've stuck it here. Inspired by Borland C++ were undo was alt+backspace.
= Redo <C-r> No reason for placing it here other than it'll be right next to backspace and the undo command.
v Enter replace mode. R
MACROS
mr<letter> Record a macro on <letter>. q
mp<letter> Play the macro on <letter>. @
BLOCK HANDLING Moving text around works very differently in WordStar compared to Vim. In Vim you copy text to registers, of which you can have several and text can stay in those registers for however long you want.
WordStar on the other hand works with a single visual block of text. You pick a beginning and an end point in the document and everything in between those two points gets highlighted and that's your block. This block can then be copied, deleted or moved to other parts of the document but you can only have one section of the document highlighted as a block at a time.
kb Mark beginning of block. my This uses two generic Vim marks, "y" and "z", to mark the beginning and end of the block.
Vim has a deficiency in how it handles marks in that if you add/remove lines then the marks will be adjusted up or down line-wise in the document but if you add/remove characters on a line then the marks on that line will not move back and forth. Instead they'll keep their absolute position on that line. I've tried to script my way around this but there's bound to be edge cases where the marks aren't shifted properly. Particularly doing a search/replace will not shift the marks as it's not possible to hook a script into this functionality in Vim.
kk Mark end of block. mz Ibid.
qb Move cursor to the beginning of the block. `y
qk Move cursor to the end of the block. `z
kc Copy block to the cursor position `yyv`z``p
kv Move block to the cursor position mt`ydv`z`tpmz`tlmy`y
ky Delete block `ydv`z:delm yz<CR>``
kh Switch high-lighting of the block on or off.
MARKERS Affected by the same malady as the beginning and end markers of the visual block described above. I.e. they might not move correctly at all times to changes in the document.
k<number> Set marker <number> to the cursor's position. m<letter> Vim doesn't allow for numbers to be used as markers so internally it uses letters a-j
q<number> Move cursor to marker <number>. `<letter>
SEARCH AND REPLACE Using search and replace commands will bring up a prompt where you'll first have to input a search term and alternatively a replace term. If no search term is provided and you just hit enter, then the word currently under the cursor will be used by invoking Vim's C-r C-w commands.
WordStar used a dialog box for doing search/replace and this can't easily be replicated in Vim. Instead I've extended the key commands "qf" for search and "qa" for search/replace with an extra letter at the end to indicate what you want to do and then it uses a simple prompt to get the terms.
qfn Search downwards from the cursor. (N)ext occurence.
qfb Search upwards from the cursor. (B)ack.
l Repeat search. n
qag Search/Replace from the beginning of the document. (G)lobal.
qan Search/Replace downwards from the cursor. (N)ext.
qab Search/Replace upwards from the cursor. (B)ack.
FILE HANDLING
kd Save and close the current file and open a new one. :w :bd :o (prompts for file name)
kt Save as. :w (prompts for file name)
ks Save. :w
kx Save and exit. ZZ
kq Abandon changes and exit. :q! (but prompts before exiting)
WINDOW HANDLING
ok Split/Switch window. :vsp/<C-w>w When first splitting the window a prompt will ask for a file name. Leaving it blank and pressing enter will split the window and display the open document in both.
In WordStar you could only have two windows open at the same time, split horizontally but with modern monitors vertical split makes more sense. Pressing the 'ok' keys again after splitting the windows will switch between them. Closing one of the windows is done with the normal file operations 'kq', 'ks' and 'kd'.
Only having access to two windows might be limiting but at the same time I never do more than one vsplit and more than one time I've ran into bugs because there was an open buffer in the background that hadn't been saved. Always being able to see documents that are being worked on should be a net positive.
ka Copy block from the inactive window to the active one. <C-w>w`yyv`z<C-w>wp
kg Move block from the inactive window to the active one. <C-w>w`ydv`z<C-w>wp
MISC
ow Toggle word wrap. :set wrap!<CR>:set breakindent!<CR> Word wrap in WordStar was always hard. If you turned it on then a line break would be added to the text whenever the cursor reached the end of the screen. Lines that where previously not word wrapped would stay that way
There really is no reason to use hard word wrap nowadays, especially when programming so the only option here is soft wrap. Break indent is useful when programming to keep indentation levels when the line wraps.