Install the vim and VIM configuration files in Ubuntu

Source: Internet
Author: User

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 --------------------------------------------------------------------------------------------------------------

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.