This article is for vim users who want to use vim to edit plaintext files directly from the file manager. Instead of using gvim, the idea is to open the text file in vim in the terminal. The file will be opened in cmdline mode of vim. The following steps explain how to do this on Ubuntu.
- Create a new file /usr/share/applications/vim.desktop and add the following contents in it:
[Desktop Entry] Keywords=editor Name=Vim Comment=Vim text editor Exec=vi %f Icon=vim Terminal=true Type=Application MimeType=text/plain Categories=GTK;Utility;TextEditor;
- Next, open the file ~/.local/share/applications/mimeapps.list and search for the line that starts with
text/plain=. Change it to