VIMRC my dedicated VIM configuration

Source: Internet
Author: User

1 SetNu2 SetWrap3 Settabstop=44 Setsofttabstop=45 SetShiftwidth=46 Syntax on7FileType on"turn on the Vim file type Auto-detect feature8 Setautoindent9 SetsmartindentTen Setscrolloff=Ten One SetRuler A SetHlsearch - Sethistory= - -  the "Set Foldenable - "Set Foldmethod=indent - "Set Foldcolumn=0 - "Set foldlevel=3 +  -Autocmd Insertleave *se nocul +Autocmd Insertenter *se cul AAutocmd bufnewfile *.CPP,*.C exec": Call Settitle ()" at func settitle () -Call Setline (1,"/ * I can do all things * /") -Call Append ("."),"/*") -Call Append (".")+1,"File Name:". Expand ("%")) -Call Append (".")+2,"Create Time:". Strftime ("%c")) -Call Append (".")+3,"Description:") inCall Append (".")+4,"*/") -     if&filetype=='CPP' toCall Append (".")+5,"#include <iostream>") +Call Append (".")+6,"using namespace std;") -Call Append (".")+7,"") the endif *     if&filetype=='C' $Call Append (".")+5,"#include <stdio.h>")Panax NotoginsengCall Append (".")+6,"") - endif the Endfunc +Autocmd Bufnewfile *Normal G A  theLet tlist_sort_type="name" +Let tlist_use_left_window=1 -Let tlist_compart_format=1 $Let tlist_exist_onlywindow=1    "If there is only one buffer to kill the window $  -  -Let tlist_auto_open=0 the Settags=tags; - SetAutochdirWuyiLet tlist_show_one_file=1 theLet tlsit_exit_onlywindow=1 -Let Tlist_winwidth= - WuMap <silent> <F8>:tlisttoggle<cr> -  Aboutfunc!COMPILEGCC () $Exec"W" -Let compilecmd="!GCC" -Let compileflag="- o%<" -     ifSearch"mpi\.h") !=0 ALet Compilecmd ="!MPICC" + endif the     ifSearch"glut\.h") !=0 -Let compileflag. ="-LGLUT-LGLU-LGL" $ endif the     ifSearch"cv\.h") !=0 theLet cpmpileflag. ="-lcv-lhighgui-lcvaux" the endif the     ifSearch"omp\.h") !=0 -Let compileflag. ="-fopenmp" in endif the     ifSearch"math\.h") !=0 theLet compileflag. ="-LM" About endif theEXEC compilecmd." % ". Compileflag the Endfunc the  +func!compilegpp () -Exec"W" theLet compilecmd="!g++"BayiLet compileflag="- o%<" the     ifSearch"mpi\.h") !=0 theLet Compilecmd ="!mpic++" - endif -     ifSearch"glut\.h") !=0 theLet compileflag. ="-LGLUT-LGLU-LGL" the endif the     ifSearch"cv\.h") !=0 theLet cpmpileflag. ="-lcv-lhighgui-lcvaux" - endif the     ifSearch"omp\.h") !=0 theLet compileflag. ="-fopenmp" the endif94     ifSearch"math.\h") !=0 theLet compileflag. ="-LM" the endif theEXEC compilecmd." % ". Compileflag98 Endfunc About  -func!Compilecode ()101Exec"W"102     if&filetype = ="CPP"103Exec"Call compilegpp ()"104ElseIf &filetype = ="C" theExec"Call COMPILEGCC ()"106 endif107 Endfunc108 109func!Runresult () theExec"W"111     if&filetype = ="CPP" theExec"Call compilegpp ()"113Exec"! ./%<" the endif the     if&filetype = ="C" theExec"Call COMPILEGCC ()"117Exec"! ./%<"118 endif119 Endfunc - 121Map <F6>: Call Runresult () <CR>122 123 124Map <F5>: Call Compilecode () <CR> theIMAP <F5> <esc>:call Compilecode () <CR>126Vmap <F5> <esc>:call compilecode () <CR>

VIMRC my dedicated VIM configuration

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.