Description: I some times found frustrating to write config files, which requires root access, by going to the shell and then all the way to the folder I first found the file. So I started to look how others had writen their scirpts (coz I sure never had) and tried to learn of them. And this was the solution. "sudo_gvim" simply runs the textfile in gvim as root, there is similar scripts for other texteditors, like gedit, but not for gvim (At least I could not find one).
requirement: gvim. On ubuntu you can find it from packagemanager or by commanding in shell "sudo apt-get install gvim".
Install: untar and copy the file to ~/.gnome2/nautilus-scripts, and make sure it is executable.
Notice: I have had some minor problems opening textfiles, it sometimes just opens a "new" file with the name of the old file, I think this is because there are spaces in the file name. Going to look into that one in near future.
I have to remind you that if you are using this script there is allways danger of hurting your computer when altering config files, so please be allways sure what you are doing before you do it. And dont plame me.Last changelog:
Just remembered that by default the skript opens gvim in reverse colors, because I like white on black more. If you want to get rid of this edit the script by removing the command "-reverse" just after the "gvim" command.
Ratings & Comments
1 Comment
Just remembered that by default the skript opens gvim in reverse colors, because I like white on black more. If you want to get rid of this edit the script by removing the command "-reverse" just after the "gvim" command.