deadpixi / sam

An updated version of the sam text editor.
Other
433 stars 47 forks source link

binding for undo? #33

Closed RamKromberg closed 7 years ago

RamKromberg commented 7 years ago

bind C u command undo would be nice :)

btw, the PR got merged recently so sam in in Nix's master now: https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/deadpixi-sam/default.nix

Unrelated, I've also updated vis which is using the sam command language with a vi like interface if you're unfamiliar & curious. A point of interest is how it solved the highlighter and extend-ability problem: It embedded lua 0_o Still, if you're going to rewrite samterm for real (which I think is crazy btw but I'm not complaining :D ), I figured you'd want to know about this...

As always, thanks for sam it's lovely :)

deadpixi commented 7 years ago

Hey @RamKromberg

The latest code in master lets you bind arbitrary sam commands to a key binding. For example, in your samrc:

bind C u command send u100

Would send sam "u100", undoing the last 100 changes. There are some examples in doc/samrc if you want to check them out.

Thanks for the work on NixOS. I've looked into their stuff, it's fascinating. I've been meaning to try it out.

I'm going to close this issue; please reopen it if this doesn't work for you.

RamKromberg commented 7 years ago

This completely exceeds my expectations. So many possibilities... :)

I'll take a courtesy month and then sneak in another PR to update sam :3 I'm only new to Nix and already been stepping on toes by making base system changes (trying to clear out some big GNU stuff in favor of smaller, saner BSD stuff) so I need to be tactful about the frequency of my packaging ;)

Again, big thanks for yet another great improvement. sam is lucky to have you :D