First, let`s have a glance at the vimrc file:
-
" maintainer: zaxbbun
-
" last change: 2012 Nov 19
-
"
-
" to use it, copy it to
-
" for Unix and OS/2: ~/.vimrc
-
" for Amiga: s:.vimrc
-
" for MS-D
-
" for Unix and OS/2: ~/.vimrc
-
" for Amiga: s:.vimrc
-
" for MS-DOS and Win32: $VIM\_vimrc
-
" for OpenVMS: sys$login:.vimrc
-
-
-
"--general settings--
-
"
-
set nocompatible
-
set autoread
-
set fenc=utf-8
-
set encoding=utf-8
-
-
"--file type--
-
"
-
filetype on
-
filetype plugin on
-
filetype plugin indent on
-
-
set number
-
set magic
-
if has('mouse')
-
set mouse=a
-
set selection=exclusive
-
set selectmode=mouse,key
-
endif
-
set ruler
-
set previewwindow
-
-
set completeopt=longest,menu,menuone
-
set updatetime=2
-
set history=40
-
set lazyredraw
-
-
" Only do this part when compiled with support for autocommands.
-
if has("autocmd")
-
" Enable file type detection.
-
" Use the default filetype settings, so that mail gets 'tw' set to 72,
-
" 'cindent' is on in C files, etc.
-
" Also load indent files, to automatically do language-dependent indenting.
-
filetype plugin indent on
-
-
" Put these in an autocmd group, so that we can delete them easily.
-
augroup vimrcEx
-
au!
-
-
" For all text files set 'textwidth' to 78 characters.
-
autocmd FileType text setlocal textwidth=78
-
-
" When editing a file, always jump to the last known cursor position.
-
" Don't do it when the position is invalid or when inside an event handler
-
" (happens when dropping a file on gvim).
-
" Also don't do it when the mark is in the first line, that is the default
-
" position when opening a file.
-
autocmd BufReadPost *
-
\ if line("'\"") > 1 && line("'\"") <= line("$") |
-
\ exe "normal! g`\"" |
-
\ endif
-
augroup END
-
else
-
set autoindent " always set autoindenting on
-
endif " has("autocmd")
-
-
"--indent--
-
"
-
set smartindent
-
set autoindent
-
set cindent
-
set cinoptions={0,1s,t0,n-2,p2s,(03s,=.5s,>1s,=1s,:1s
-
-
"--tab--
-
"
-
set noexpandtab
-
set smarttab
-
-
set softtabstop=4
-
set tabstop=4
-
set shiftwidth=4
-
set backspace=eol,start,indent
-
-
"--line break--
-
"
-
set whichwrap=b,s,<,>,[,],h,l
-
set linebreak
-
-
"--alpha case--
-
"
-
set ignorecase
-
set smartcase
-
-
"--search--
-
"
-
if &t_Co > 2 || has("gui_running")
-
syntax on
-
set hlsearch
-
endif
-
set incsearch
-
-
"--show options--
-
"
-
set wildmenu
-
set wildmode=list:full
-
set showcmd
-
set showmode
-
set showmatch
-
set matchtime=2
-
-
"--backups and buffer--
-
"
-
set nowb
-
set nobackup
-
set noswapfile
-
set bufhidden=hide
-
set confirm
-
-
-
"--ctags settings--
-
"
-
map :!ctags --links=yes --languages=c,c++ -I "__THROW __nonnull __wur __attribute__ __attribute_pure__ __attribute_deprecated__" --c-kinds=+lpx --c++-kinds=+lpx --fields=+nltiasS --extra=+q --tag-relative=no . :TlistUpdate
-
imap
-
-
set tags=tags
-
set tags+=./tags
-
set tags+=/usr/src/tags
-
set tags+=/usr/include/c++/tags
-
-
-
"--OmniCppComplete settings--
-
"
-
imap
-
imap
-
-
let OmniCpp_MayCompleteDot = 1 " autocomplete with .
-
let OmniCpp_MayCompleteArrow = 1 " autocomplete with ->
-
let OmniCpp_MayCompleteScope = 1 " autocomplete with ::
-
-
let OmniCpp_GlobalScopeSearch=1 " enable the global scope search
-
let OmniCpp_NamespaceSearch = 2 " search namespaces in this and included files
-
let OmniCpp_DefaultNamespaces=["std"]
-
-
let OmniCpp_DisplayMode=1
-
let OmniCpp_ShowAccess=1
-
let OmniCpp_ShowPrototypeInAbbr = 1 " show function prototype in popup window
-
let OmniCpp_SelectFirstItem = 2 " select first item (but don't insert)
-
-
-
"--taglist settings--
-
"
-
let Tlist_Auto_Open=1
-
let Tlist_Process_File_Always=1
-
let Tlist_Show_One_File=1
-
let Tlist_Use_SingleClick=1
-
let Tlist_File_Fold_Auto_Close=1
-
let Tlist_Exit_OnlyWindow=1
-
-
-
"--winManager settings--
-
"
-
map :BottomExplorerWindow
-
map :FirstExplorerWindow
-
map :WMToggle
-
-
let winManagerWindowLayout='BufExplorer|FileExplorer,TagsExplorer,TagList'
Then u can download the latest plugins(code_complete, OmniCppComplete, taglist, bufexplorer, vim-autocomplpop, winManager) from the website.
or u can just visit the following link to get them all from my box:
as stl completion, u can download the modified stl source files from: ; then ctags it to tags file which u needed to be added into the tags var in the vimrc file.
If you have any suggestions, welcome to contact me with zaxbbun@gmail.com
阅读(847) | 评论(0) | 转发(0) |