@andy80
nano is just an text editor. Use one that suits you best.
Also you can try starting nano with full path /usr/bin/nano or may be trying vi?
Or you can edit the file on your PC and then replace it on device, but be aware of Windows/Linux differences for CR/LF.