Set Autoreadsyntax on "set number" filetype ident on "set Autoindent" set Expandtabset cindentset shiftwidth=4autocmd filety PE make setlocal noexpandtabset tabstop=4set showmatchset matchtime=1set smartindentset scrolloff=3set nocompatible "No Vim Compatibleset encoding=utf-8set fileencoding=utf-8 "set Cursorlineset backspace=2" F2 save Filemap <F2>:w< Cr> "F5 compile Funmap <F5>: Call Compilerun () <cr>func! Compilerun () if &filetype = = ' C ' exec "!gcc-std=c99%-o%<.out &&/%<.out" ElseIf &f Iletype = = ' cpp ' exec "!g++-std=c++11%-o%<.out &&/%<.out" elseif &filetype = = ' sh ' :!. /% endifendfunc "Gvim solution menu garbled" language messages Zh_cn.utf-8 "source $VIMRUNTIME/delmenu.vim" source $VIMRUNTIME/menu.vim "Minibuf configlet g:minibufexplmapwindownavvim = 1let g:minibufexplmapwindownavarrows = 1let g: Minibufexplmapctabswitchbufs = 1let G:minibufexplmodseltarget = 1 "Map the SPACEBAR to: Nmap <space>:" Judging the operating systemif (Has ("Win32") | | have ("Win64") | | have ("Win32unix")) Let G:iswin = 1else let G:iswin = 0endif "is the terminal or GVIMIF has (" Gui_running ") Let G:isgui = 1else let G:isgui = 0endifif (G:isgui) set cursorline" ColorScheme Wombat hi cu Rsorline guibg= #333333 Hi cursorcolumn guibg= #333333 set guifont=yahei\ consolas\ hybrid\ set Mouse=aendifset Laststatus=2 "Always show status bar" switch nn between buffer with c-j,k <C-J>: Bn<cr>nn <C-K>:bp<cr> Bash (Emacs) style keyboard binding I Map <C-e> <end>imap <C-a> <HOME> "Copy from system Clipboard, cut, paste map <C-c>" +y "Map <F8>" +xmap < C-v> the width of the "+p" plug-in window, such as Taglist,nerd_tree, set the Let S:plugwinsize = "NERD tree" http://www.vim.org/scripts/script.php? Script_id=1658let Nerdtreeshowhidden = 1let Nerdtreewinpos = "Left" let Nerdtreewinsize = S:plugwinsize nmap <leader> ;n:nerdtreetoggle<cr>
Desktop VIM Configuration