Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to assign a terminal based program as a default program in Gnome Shell 3.2. I am running Ubuntu 11.10.

More specifically, I want my .txt files to open in vim with maximized Gnome Terminal.

The 'Open with other application' menu does not provide for this.

Thanks in advance for help.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

For files handling in gnome you will have to use the graphical version of vim called gvim, to install it type sudo apt-get install vim-gnome.

Has an option you can create a .desktop file that will be listed on 'Open with other application' tab:

  • Navigate to ~/.local/share/applications
  • Create a file called vim-console.desktop with these contents:
[Desktop Entry]
Encoding=UTF-8
Name=Vim Text Editor (Console)
Comment=Edit text files in a console using Vim
Exec=gnome-terminal --full-screen --execute bash -c "vim %u"
Terminal=true
Type=Application
Icon=/usr/share/pixmaps/vim.svg
Categories=Application;Utility;TextEditor;
StartupNotify=true
MimeType=text/plain;
NoDisplay=true

After this you will see Vim Text Editor (Console) in your Open with other application tab, select it and when you double click the file you will be able to open it using vim terminal editor.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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