How can I change the default text editor from gedit to vim? When I click on a text file, I want it to open in vim under the terminal instead of gedit.
|
You don't say how you are clicking on this file, so I will explain a way to do it in Gnome from Nautilus. It should work in other cases, I believe. First, to get Vim (or any app) into the "open with other application" list, you need to create a .desktop file in
This made "Vim" appear in the list of possible apps when I right-clicked in Nautilus, and opened the file as expected. Let me know if there are any problems. |
|||||||||||||
|
|
Save this as
Then in Nautilus right-click on a text file, choose "Properties" and go to "Open with". If vim isn't shown here click "Show other applications". Select vim and click "Set as default". |
|||
|
|
detail and screenshot check this answer: How do I stop gedit from opening anything? |
|||
|
|
|
The problem with the The next best thing is using |
|||||||
|