Let's say I want to create a .desktop file in /usr/share/applications
and I do something like
sudo -i gedit /usr/share/applications/cipricus.desktop
This will open that file in gedit.
If I try to use the default text editor Scratch,
sudo -i scratch-text-editor /usr/share/applications/cipricus.desktop
that will just open Scratch.
If that file already exists, Scratch will open it just like Gedit does. But it doesn't seem able to create files. I have also tried without the need of administrator privileges.