0

I uninstalled Vim 8.0 with sudo apt remove vim-common, and compiled and installed the latest version:

git clone https://github.com/vim/vim.git
cd  vim/src
make
sudo make install

I can run Vim 8.2 with vim in a terminal.

This is the .desktop file for Vim 8.2:

[Desktop Entry]
Name=Vim
Comment=text editor
Exec=/home/debian/vim/src/vim  %F
Icon=/home/debian/vim/src/vim.ico
Type=Application
MimeType=text/plain
Categories=GTK;Utility;TextEditor;
Keywords=text;editor;vim;

Why can't I run Vim from the menu? When I click on "Vim" in the menu, Vim doesn't pop up.

enter image description here

It makes no difference if I use:

Exec=/home/debian/vim/src/vim  %F

or

Exec=/usr/local/bin/vim  %F

I am using lxterminal in debian.

3 Answers 3

0

In your terminal, type which vim and check you're using the correct path.

vim is a text-based program and needs to be run in a terminal. In order for your .desktop file to work, you'd need to add the line: Terminal=true, like so:

[Desktop Entry]
Name=Vim
Comment=text editor
Exec=/home/debian/vim/src/vim  %F
Icon=/home/debian/vim/src/vim.ico
Type=Application
MimeType=text/plain
Categories=GTK;Utility;TextEditor;
Keywords=text;editor;vim;
Terminal=true

There is a GUI version of Vim available, usually invoked with gvim from the command line. If you compiled Vim with graphical support, you may want to use that instead.

0

You may need to run that command in a terminal window.

vim is a commandline program which will not open a graphical user interface. When clicking the icon perhaps the program is run but you cannot see it.

In the launcher's Properties go into Edit (where you can change the path), then check the box Run in Terminal.

0

What terminal emulator do you use? Call it through this. An example for xfce4-terminal:

vim.desktop

Exec=xfce4-terminal -T ViM -I gvim --hide-scrollbar -e "vim %F"

Whatever terminal you use, -e is used to execute a command inside the terminal.

2
  • I am using lxterminal in debian.
    – showkey
    Jul 18, 2020 at 7:56
  • Try Exec=lxterminal -t ViM -e "vim %F" or Exec=lxterminal -t ViM -e vim %F. -t is just for the title of the window. Probably you also need to insert the full path for vim, for example /usr/local/bin/vim, since you compiled it yourself.
    – Krackout
    Jul 18, 2020 at 7:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .