chatsiri rattana | 112c8c1 | 2012-02-19 09:25:13 +0700 | [diff] [blame] | 1 | set number |
| 2 | syntax on |
| 3 | set ts=2 |
| 4 | filetype on |
| 5 | au BufNewFile,BufRead *.cu set filetype=c |
| 6 | let $VIMRUNTIME = "/san01/home/chatsiri/.vim/vimrc" |
| 7 | autocmd VimEnter * NERDTree |
| 8 | set nocompatible |
| 9 | |
| 10 | " configure tags - add additional tags here or comment out not-used ones |
| 11 | set tags+=~/.vim/tags/cpp |
| 12 | |
| 13 | " build tags of your own project with Ctrl-F12 |
| 14 | map <C-F12> :!ctags -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q .<CR> |
| 15 | nmap <silent> <c-n> :NERDTreeToggle<CR> |
| 16 | |
| 17 | |
| 18 | " OmniCppComplete |
| 19 | let OmniCpp_NamespaceSearch = 1 |
| 20 | let OmniCpp_GlobalScopeSearch = 1 |
| 21 | let OmniCpp_ShowAccess = 1 |
| 22 | let OmniCpp_ShowPrototypeInAbbr = 1 " show function parameters |
| 23 | let OmniCpp_MayCompleteDot = 1 " autocomplete after . |
| 24 | let OmniCpp_MayCompleteArrow = 1 " autocomplete after -> |
| 25 | let OmniCpp_MayCompleteScope = 1 " autocomplete after :: |
| 26 | let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"] |
| 27 | " automatically open and close the popup menu / preview window |
| 28 | au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif |
| 29 | set completeopt=menuone,menu,longest,preview |