Comment by evacchi
10 years ago
marginally relevant: I was looking for a terminal text editor for git commits and other similarly simple tasks: my only requirement is that I can save&leave with ^D. Any suggestions?
10 years ago
marginally relevant: I was looking for a terminal text editor for git commits and other similarly simple tasks: my only requirement is that I can save&leave with ^D. Any suggestions?
Simplest I can think of:
You'll need to hit enter before ^D.
You can add simple Emacs-like keybindings by changing that into
Or just learn ed:
(the numbers are ed telling me how much was read and written; `1c` means change the first line; `.` means I'm done inserting (go back to command mode) and `w` means write/save; exit with ^D)
If anyone is having trouble getting the first one working, you need a shebang at the top of the file!
But the second point is more valid. Ed is the standard editor.
What system are you on that needs the shebang? bash 4 on Ubuntu seems to just run it in bash, though I guess it probably shouldn't :-)
Thanks for the tips!
Emacs?