Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
12
rated 0 times [  12] [ 0]  / answers: 1 / hits: 3930  / 2 Years ago, mon, may 30, 2022, 9:11:49

I use gVim all the time and open all sorts of plain text files, source codes and virtually anything that is readable with gVim.



Ubuntu however decides that I should use gedit!



I got searching and I found this that correctly makes ubuntu open my plain text files with gVim, but no luck with source files. I set both



sudo update-alternatives --config editor
sudo update-alternatives --config gnome-text-editor


to gVim, but still it uses gedit for source files.



Not to mention most of what you find on the internet say "right click->Open with->Always use this application" to set the default app for each of your file types. I'm fine with that, but in the new ubuntu (11.10) that option is simply not there anymore. but it could get rather cumbersome.



I went for uninstalling gedit, but it told me if I do, future updates will not include new items in The Ubuntu Desktop System set.



My question is, how can I tell ubuntu to change the default application of all those things that open with gedit to gVim?



If no such thing is possible (which would be the stupidest thing ever), would I really miss much if I uninstall gedit and forget about those mentioned new items?


More From » 11.10

 Answers
3

On 11.10 defaults.list is under /etc/gnome/defaults.list




  • Open defaults.list using any text editor.

  • Replace text/plain=gedit.desktop with text/plain=gvim.desktop

  • Save and close.



Right click on any text file and you will see like this:-



enter image description here



It works for me :)


[#42482] Tuesday, May 31, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
terose

Total Points: 185
Total Questions: 125
Total Answers: 131

Location: Venezuela
Member since Mon, Dec 13, 2021
2 Years ago
terose questions
;