Vim configuration file Backup November 16, 2015

Source: Internet
Author: User
Tags diff

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

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.