Add vim to the right-click menu

Source: Internet
Author: User

 

Every time you use vim, you need to enter the corresponding directory from the terminal and open the file for editing. This is always very troublesome, so I searched the internet to add vim to the right-click menu, which is very simple and easy to use.

 

The steps are as follows:

 

1. Use vim to open defaults. list and replace all gedit. desktop with vim. desktop.

 

Command: sudo vim/etc/gnome/defaults. list

 

: % S/gedit. desktop/vim. desktop/g

 

2. Create a vim. desktop file under/usr/share/applications.

 

Command: sudo vim/usr/share/applications/vim. desktop

 

The content is as follows:

 

[Desktop Entry]

Encoding = UTF-8

Type = Application

Exec = vim % f

Icon =/usr/share/vim/vim48x48.png

Name = Vim

Terminal = true

NoDisplay = true

 

In this way, the vim On-Demand menu item appears in the right-click menu.

 

From: Ling Feng's column

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.