2

When I run vim from the start menu, it opens up an xfce terminal window and runs vim. However, when I set vim to be my default text editor and double-click a file, it runs in xterm instead of the xfce terminal for some reason. I'd rather have it run in the xfce terminal all the time because xterm's text size is too small on my screen.

I tried changing the vim.desktop file to try to force vim to start in xfce4-terminal:

Exec=vim %F

to:

Exec=xfce4-terminal -e vim %F

but when I double clicked a file, it just started in xterm again before immediately closing. Can someone offer insight?

Here's the rest of the vim.desktop:

[Desktop Entry]
Version=1.0
Type=Application
Name=Vim
GenericName=Text Editor
Comment=Edit text files
Icon=vim
TryExec=vim
Exec=xfce4-terminal -e vim %F
NoDisplay=false
Categories=TextEditor;Utility;
MimeType=text/plain;
StartupNotify=false
Terminal=true
0

This is old post, but I was just looking for this, so here's what worked for me.

[Desktop Entry]
Version=1.0
Type=Application
Name=Vim
GenericName=Text Editor
Comment=Edit text files
Icon=vim
TryExec=vim
Exec=xfce4-terminal -e "vim %F"
NoDisplay=false
Categories=TextEditor;Utility;
MimeType=text/plain;
StartupNotify=false
Terminal=false

quote the vim command and set terminal to false

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.