I have vim.desktop
file in ~/.local/share/applications/
directory with these lines:
[Desktop Entry]
Name=Vim Text Editor
Comment=Edit text files
TryExec=vim
Exec=vim
Terminal=true
Type=Application
Icon=terminal
Categories=Utility;TextEditor;
StartupNotify=true
MimeType=text/plain;
This .desktop
file works fine at this point (i.e. I can search in Unity dashboard it and click it to open vim)
But I wanted more from this desktop file. I wanted to start it in insert mode, so I changed some parts of it, like:
TryExec=vim -c 'startinsert'
Exec=vim -c 'startinsert'
But as soon as I save this file I am not able to search it.
Try logging out/in or even restarting to fix this. The following
.desktop
file works perfectly for me: