"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " General """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" set nocompatible " get out of horrible vi-compatible mode filetype on " detect the type of file set history=1000 " How many lines of history to remember set clipboard+=unnamed " turns out I do like is sharing windows clipboard set ffs=dos,unix,mac " support all three, in this order filetype plugin on " load filetype plugins set viminfo+=! " make sure it can save viminfo set isk+=_,$,@,%,#,- " none of these should be word dividers, so make them not be set complete+=k "add dictionary complete set autowrite set autoread set nobackup "the ":substitute" flag 'g' is default on. This means that "all matches in a line are substituted instead of one set gdefault """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Theme/Colors """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" set background=dark " we are using a dark background syntax on " syntax highlighting on "colorscheme desert colorscheme biogoo "colorscheme oceandeep "colorscheme wintersday """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Vim UI """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" set wmh=0 "This sets the minimum window height to 0 set lsp=0 " space it out a little more (easier to read) set wildmenu " turn on wild menu set ruler " Always show current positions along the bottom set cmdheight=2 " the command bar is 2 high "set number " turn on line numbers set lz " do not redraw while running macros (much faster) (LazyRedraw) set hid " you can change buffer without saving set backspace=2 " make backspace work normal set whichwrap+=<,>,h,l " backspace and cursor keys wrap to set mouse=a " use mouse everywhere set shortmess=atI " shortens messages to avoid 'press a key' prompt set report=0 " tell us when anything is changed via :... set noerrorbells " don't make noise " make the splitters between windows be blank set fillchars=vert:\ ,stl:\ ,stlnc:\ "不显示工具条和菜单 set guioptions-=T "get rid of toolbar "启动时最大化窗口 au GUIEnter * simalt ~x "不显示菜单 "set guioptions-=m "get rid of menu """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Visual Cues """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" set showmatch " show matching brackets set mat=5 " how many tenths of a second to blink matching brackets for set nohlsearch " do not highlight searched for phrases set incsearch " BUT do highlight as you type you search phrase set listchars=tab:\|\ ,trail:.,extends:>,precedes:<,eol:$ " what to show when I hit :set list set lines=80 " 80 lines tall set columns=160 " 160 cols wide set so=10 " Keep 10 lines (top/bottom) for scope set novisualbell " don't blink set noerrorbells " no noises set statusline=%t%m%r%h%w\ [%{&ff}:%{&enc}:%Y]\ [line=%04l/%04L\ col=%04c][%p%%] set laststatus=2 " always show the status line """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Text Formatting/Layout """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" set fo=tcrqn " See Help (complex) set ai " autoindent set si " smartindent set cindent " do c-style indenting set tabstop=4 " tab spacing (settings below are just to unify it) set softtabstop=4 " unify set shiftwidth=4 " unify set noexpandtab " real tabs please! set nowrap " do not wrap lines set smarttab " use tabs at the start of a line, spaces elsewhere """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Folding " Enable folding, but by default make it act like folding is off, because folding is annoying in anything but a few rare cases """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" set foldenable " Turn on folding set foldmethod=indent " Make folding indent sensitive set foldlevel=100 " Don't autofold anything (but I can still fold manually) set foldopen-=search " don't open folds when you search into them set foldopen-=undo " don't open folds when you undo stuff """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " File Explorer """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let g:explVertical=1 " should I split verticially let g:explWinSize=35 " width of 35 pixels """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Win Manager """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let g:winManagerWidth=35 " How wide should it be( pixels) let g:winManagerWindowLayout = 'TagList,FileExplorer|BufExplorer' " What windows should it let g:persistentBehaviour=0 "vim will quit if only the explorers window are the one left """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Buffer Explorer """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let bufExplorerDefaultHelp = 0 let bufExplorerDetailedHelp = 0 let bufExplorerMaxHeight = 15 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " TagList """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" "for Windows only "最好把ctags.ext放到vim的安装目录中,避免找不到ctags的问题 let Tlist_Ctags_Cmd = 'ctags.exe' " Location of ctags let Tlist_Sort_Type = "name" " order by " Control whether additional help is displayed as part of the taglist or not. " Also, controls whether empty lines are used to separate the tag tree. let Tlist_Compact_Format = 1 "如果作为winManager的一部分,不需要设置Tlist_Exit_OnlyWindow "let Tlist_Exit_OnlyWindow = 1 " if you are the last, kill yourself " Automatically close the folds for the non-active files in the taglist window let Tlist_File_Fold_Auto_Close = 1 let Tlist_Enable_Fold_Column = 0 " Do not show folding tree "显示Tlist的菜单和鼠标右键菜单,taglist.vim 4.0 beta以后版本才支持 let Tlist_Show_Menu=1 "Display the tags for only one file in the taglist window let Tlist_Show_One_File=1 "如果作为winManager的一部分,不需要设置Tlist_Auto_Open "let Tlist_Auto_Open=0 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Minibuf """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let g:miniBufExplTabWrap = 1 " make tabs show complete (no broken on two lines) let g:miniBufExplModSelTarget = 1 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Matchit """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let b:match_ignorecase = 1 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Added by VimOutliner installer au! BufRead,BufNewFile *.otl setfiletype vo_base " End modifications by VimOutliner installer """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Autocommands """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" autocmd BufEnter * :syntax sync fromstart " ensure every file does syntax highlighting (full) " complete from filetype syntax file autocmd Syntax * execute "setlocal dictionary=".$VIMRUNTIME."/syntax/".getbufvar("%","current_syntax").".vim" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Mappings """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" "insert mode" "防止windows解释alt组合键 set winaltkeys=no inoremap inoremap inoremap inoremap inoremap map j_ map k_ map :bN " right arrow (normal mode) switches buffers (excluding minibuf) map :bp " right arrow (normal mode) switches buffers (excluding minibuf) "map :MBEbn " right arrow (normal mode) switches buffers (excluding minibuf) "map :MBEbp " left arrow (normal mode) switches buffers (excluding minibuf) "map :WMToggle " up arrow (normal mode) brings up a file list "map :Tlist " down arrow (normal mode) brings up the tag list """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" "for winManager noremap :FirstExplorerWindow noremap :BottomExplorerWindow noremap :WMToggle """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" noremap :WMToggle nmap ,s :source $VIM/_vimrc nmap ,v :e $VIM/_vimrc ab bbb /* ab eee */ """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" "key mapping end """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " my Personal Setting "you can contact me at harry.linxd at gmail.com """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" "使用中文帮助 if version >= 603 set helplang=cn endif source $VIMRUNTIME/vimrc_example.vim source $VIMRUNTIME/mswin.vim behave mswin "personal setting end """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""