d99kris / nchat

Terminal-based Telegram / WhatsApp client for Linux and macOS
MIT License
742 stars 48 forks source link

Add support for configuring external editor command #229

Closed d99kris closed 6 months ago

d99kris commented 6 months ago

Discussed in https://github.com/d99kris/nchat/discussions/228

Originally posted by **arcxne** May 12, 2024 I usually use the message compose function to write my messages instead of typing directly (due to my keybindings). An annoyance I face is that after writing my message, I have to press ctrl-x, y, enter just to save my message, whereas in vim, this would just be esc, :wq. As such, would it be possible to allow users to change the default message compose to their preferred editor (e.g. vim, emacs)? This could be added inside app.conf and users can change the default similar to how the message viewer can be changed.
d99kris commented 6 months ago

A configuration parameter message_edit_command has been added in ui.conf with above commit. To use vim one can set it like this: message_edit_command=vim

Bellavene commented 5 months ago

Thank you for that, added autosave option to external editor. All works like one now.