Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 3417  / 1 Year ago, sat, may 27, 2023, 2:37:28

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.


More From » 11.10

 Answers
0

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.


[#42739] Saturday, May 27, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nalystcul

Total Points: 390
Total Questions: 106
Total Answers: 115

Location: Tokelau
Member since Sun, May 7, 2023
1 Year ago
;