Vim configuration file

Source: Internet
Author: User
Tags diff

Ps:f7 Compile F9 run F8 call gdb F12 Form Initial header (C + +) (both in normal mode)

CTRL + A Select all plus copy (normal mode)

CTRL + Z Auto Indent (normal mode)

Compile option added-std=c++11-o2

Set Nocompatiblesource $VIMRUNTIME/vimrc_example.vimsource $VIMRUNTIME/mswin.vimbehave mswinset 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's eq = ' ' else let cmd = substitute ($VIMRUNTIME, ' ', ' "', '). ' \diff "' endif else let cmd = $VIMRUNTIME. ' \diff ' endif silent execute '! '. Cmd. ‘ ‘ . Opt. Arg1. ‘ ‘ . Arg2. ' > '. Arg3. Eqendfunctionsyntax onset nuset nobackupset noswapfileset cindentset mouse=aset tabstop=8set shiftwidth=8set background =darkcolorscheme Eveningset Guifont=courier_new:h10map <C-A> GGVG "+ymap <C-Z> gg=gmap <F7>: Call CMP () <cr>func! CMP () Exec "W" exec "!g++-o2-std=c++11%-o%<" Endfuncmap <F8>: Call Rungdb () <cr>func! Rungdb () Exec "W" exec "!g++-wall-o2-std=c++11%-g-o%<" exec "!gdb ./%<" Endfuncmap <F9>: Call R Un () <cr>func! Run () Exec "!%<" Endfuncmap <F12>: Call Settitle () <cr>func settitle () Let L = 0let L = L + 1 | Call Setline (L, ' #include <bits/stdc++.h> ') let L = L + 1 | Call Setline (L, ") let L = L + 1 | Call Setline (L, ' using namespace std; ') Let L = L + 1 | Call Setline (L, ") let L = L + 1 | Call Setline (L, ' #define REP (I, A, b) for (Int. I (a); I <= (b); ++i) ') let L = L + 1 | Call Setline (L, ") let L = L + 1 | Call Setline (l, ' int main () {') let L = L + 1 | Call Setline (L, ") let L = L + 1 | Call Setline (L,") let L = L + 1 | Call Setl INE (L, ') let L = L + 1 | Call Setline (L, ' return 0; ') Let L = L + 1 | Call Setline (L, '} ') let L = L + 1 | Call Setline (L, ") Let L = L + 1 | Call Setline (L, ') Endfunc

Vim configuration file

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.