To open all
text file of Ubuntu with the most popular text editor Sublime Text 2 you just need to do the following job.
First type the following command :
sudo sublime /usr/share/applications/defaults.list
Make sure that you can run
Sublime Text by typing just
sublime command in terminal. If this hasn’t configured yet. Just see this post about how to install Sublime Text 2, make luncher and make command in terminal.
Now after opening the defaults.list file just replace all occurrences of gedit.desktop with sublime.desktop. Now all of your text file will open in Sublimte Text editor.