Originally Posted by
singaporexuexi
Hello there!
I have been using Gedit for a while now, but can't figure out how to get it how to save by default as a text file (.txt) like notepad does in Windows. I don't like the fact that Gedit by default does not save in any file extension. Any help with this is appreciated.
hack alert:
interesting challenge. How I solved it.
1. write a shell script and save it in your bin directory:
Code:
#!/bin/bash
cd ~/gedit
gedit
Code:
chmod +x name_of_shell_script.sh
edit gedit launcher:
right click Applications menu > Edit Menus
click on accesories gedit properties
change gedit %U to /home/username/bin/name_of_shell_script.sh
now when you save a file it will save to gedit directory by default.
write a sed script that changes all files in gedit directory to have .txt extensions. and set it as a cron job.
I warned you this was a hack!
Bookmarks