Set nocompatible
SOURCE $VIMRUNTIME/vimrc_example.vim
SOURCE $VIMRUNTIME/mswin.vim
Behave Mswin
Set Nobackup
Set Nu
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 fileencodings=utf-8,gbk,gb18030,gk2312
Set go= "Setting does not display the graphics button
Syntax on "syntax highlighting
Set ruler "show ruler
Set showcmd "Input command displayed, see clearly
Set Completeopt=preview,menu "Setting code completion
Set clipboard+=unnamed "Shared clipboard
Set Cursorline "highlight when moving forward
Set Noeb "Remove input error sounds
Set confirm "When processing unsaved or read-only files, pop-up confirmation
Set autoindent "Setting Auto Indent
Set Cindent
Set tabstop=4 the width of the TAB key
"Unified Indentation is 4
Set softtabstop=4
Set shiftwidth=4
Set Noexpandtab "Do not use spaces instead of tabs
Set Smarttab use tabs at the beginning of rows and segments
Set laststatus=2 "Always show status bar
filetype on "Detecting file types
FileType plugin on "load file type plug-in
"Map Select all + Copy Ctrl + A
Map <C-A> Ggvgy
"Map new File Ctrl + N
Map <C-N>:new<cr>
"Auto-complete parentheses
: Inoremap (() <esc>i
: Inoremap) <c-r>=closepair (') ') <CR>
: inoremap {{<cr>}<esc>o
: Inoremap} <c-r>=closepair ('} ') <CR>
: Inoremap [[]<esc>i
: Inoremap] <c-r>=closepair ('] ') <CR>
: Inoremap "" "<esc>i
: Inoremap ' <esc>i
function! Closepair (char)
If Getline ('. ') [Col ('. ')-1] = = A:char
Return "\<right>"
Else
Return A:char
endif
Endfunction
Vim configuration file Backup November 16, 2015