Original article: Install vim and VIM in Ubuntu-kids not reading-iteye Technology website
Install Vim in Ubuntu, VIM in Ubuntu,
Run sudo apt-Get install vim-GTK.
Use Vim to edit files
You can use gvim to open Vim in graphic mode.
The following is my vim configuration file (thanks to a teacher, this file is left for me)
Bytes --------------------------------------------------------------------------------------------------------------
Set nocompatible
Set nu
Set langmenu = zh_CN.UTF-8
Set encoding = UTF-8
Language message zh_CN.UTF-8
Set tabstop = 2
Set softtabstop = 2
Set shiftwidth = 2
Colorscheme torte
Source $ vimruntime/vimrc_example.vim
Source $ vimruntime/mswin. Vim
Behave mswin
Set diffexpr = mydiff ()
Function mydiff ()
Let opt = '-A -- binary'
If & diffopt = ~ 'Icase' | let opt = opt. '-I' | endif
If & diffopt = ~ 'Iwhite' | let opt = opt. '-B' | endif
Let arg1 = V: fname_in
If arg1 = ~ ''| Let arg1 = '"'. arg1. '"' | endif
Let arg2 = V: fname_new
If arg2 = ~ ''| Let arg2 = '"'. arg2. '"' | endif
Let arg3 = V: fname_out
If arg3 = ~ ''| Let arg3 = '"'. arg3. '"' | endif
Let eq =''
If $ vimruntime = ~ ''
If & SH = ~ '\ <Cmd'
Let cmd = '""'. $ vimruntime. '\ diff "'
Let eq = '"'
Else
Let cmd = substitute ($ vimruntime, '', '"', ''). '\ diff "'
Endif
Else
Let cmd = $ vimruntime. '\ diff'
Endif
Silent execute '! '. Cmd. ''. Opt. arg1.''. arg2.'> '. arg3. EQ
Endfunction
Set nobackup
Bytes --------------------------------------------------------------------------------------------------------------