Recently nano has started to be very slow when editing files over ssh. It's particularly slow when editing large files with syntax highlighting.
It's most noticeable when yanking lines. There can sometimes be a delay of well over a second while yanking lines (they eventually do get yanked but this often means I end up grabbing more lines than I intended once it refreshes the screen).
I do like syntax highlighting but I'm willing to forgo it if this means I can get back to normal editing speeds again, but this wasn't an issue in the past and I'm wondering if there is some configuration changes I can look into to improve the response time.
While you are editing your file in Nano run ping from your machine to the machine you are connected to with SSH.
In the ping's output look for packet loss, if you have packet loss on the line your Nano session will be unstable.
If you have packet loss, you will need to investigate the cause with the network connectivity provider.