IGI-111 / Smith

A simple text editor written in Rust
MIT License
169 stars 6 forks source link

Don't ask where to save when a file is opened #12

Closed matthias-t closed 5 years ago

matthias-t commented 6 years ago

If I run smith file.rs, make some changes and hit Ctrl+s a prompt appears asking where to save to. Maybe there could be a separate shortcut for Save As, like Ctrl+Shift+S?

IGI-111 commented 6 years ago

That's intended behavior. I'm trying to keep the few keybindings simple and essentially emulate the behavior of nano's ^O in this case.

I'm certainly willing to add new keybinds if they make sense (a Ctrl+f would certainly be in scope), but not just to save one RET keystroke.

matthias-t commented 6 years ago

If there has to be one shortcut for saving, then in my opinion it shouldn't be save as. I've probably saved a million things in my life, but I've only used save as once or twice. As I see it Smith is a minimal editor, with a carefully selected set of features, that doesn't cover every edge case; and saving to another file is an edge case. If it ever occurs, all it takes is a cp.

IGI-111 commented 6 years ago

We're veering into bike-shedding territory here, but I tried to give the idea a fair hearing.

So I've been taking a look back at some of the text editors that share the scope, and using the latest micro I've found that I quite like the ^S to save or prompt if we don't know the filename. It does break my flow a little less than nano when editing multiple files.

Ultimately the goal is to be unsurprising with the keybinds, and looking at the software I have around ^S is indeed usually an immediate save.

So I guess in the end I do agree with this change.