+1 for Vim
You'll need a graphical version of vim, like gvim, for tabs, but it certainly can handle the rest, and a whole lot more. (It's actually hard to get vim without gvim these days, so this is no issue.)
It's weird and has a definite learning curve at first, but well worth it.
And it's available for just about any platform, from Amiga to Windows to Linux to you-name-it.
It definitely has macros, and yes, you can edit them if you make a mistake, though it also has a completely separate scripting language, which I tend to use more often. You can also map any key to any key combination, either recursively or non-recursively.
Another cool thing is that you can open .ePubs with it and edit the files inside and save without having to recreate the ePub, remaining valid. Kovid
gives the details here.