Many of the graphical text editors will automatically ask for privilege escalation when they detect that you cannot write to a file.