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