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/