Tuesday, July 30, 2019

linux - How to specify arguments for editor in Midnight Commander


I'm using Nano as the editor in MC. I would like it to scroll by 1 line, which is not its default behavior.


I've found that you can specify the option -S when you run Nano to enable smooth scrolling, but I don't know how to tell MC to do that.


How can I specify the options for an external editor that Midnight Commander uses?


Answer



I've edited the file ~/.selected_editor and added the -S option there:


SELECTED_EDITOR="/bin/nano -S"

It works as long as I don't run select-editor, which would overwrite this change.


EDIT:


Actually there's no need to use the command-line option in this case. Smooth scrolling can be set in /etc/nanorc with set smooth.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...