Vim/gvim: Install gvim

Source: Internet
Author: User

Install gvim on Ubuntu 10.10.


Start download and install


Sudo apt-Get Update (update the source, which is optional)


Sudo apt-Get install vim-gnome


After installing OK,Configure the menu for gvim (Two methods)


Method 1: sudo Vim/usr/share/applications/gvim. Desktop


Method 2: sudo gedit/usr/share/applications/gvim. Desktop


If you have used Vim before, use method 1. If you have not used Vim before, use method 2.


In the open file, you will see a lot of content, add at the end of the file


[Desktop entry]
Name = gvim
Comment [zh_cn] = gvimeditor
Exec = gvim
Icon =/usr/share/pixmaps/gnome-word.png
Terminal = false
X-multipleargs = false
Type = Application
Categories = application; development;
Encoding = UTF-8
Startupnotify = true


In this way, gvim will be available under application/programing.


Of course, you can directly press gvim on the terminal or start it.


Configure gvim


Run the following command in your directory (/home/username:


Vim. vimrc


Write the following content and save it:


"Set row number

Set number

"Set Font
Set guifont = comic \ Sans \ Ms \ 12

"No automatic backup
Set nobackup
"Set color
Colorscheme desert
"Allow the return key deletion and Tab operations
Set smartindent
Set smarttab
Set expandtab
Set tabstop = 4
Set softtabstop = 4
Set shiftwidth = 4
Set backspace = 2
Set textwidth = 79
"Enable mouse
Set mouse =
"Sets automatic encoding recognition and displays Chinese quotation marks
Set fileencodings = UTF-8, GBK
Set ambiwidth = double

"Syntax highlighting
Syntax on
"Code folding Function
"Set foldmethod = manual


The effect is as follows:




More colors: http://code.google.com/p/vimcolorschemetest/







Related Article

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.