|
| 1 | +" All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just |
| 2 | +" /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime |
| 3 | +" you can find below. If you wish to change any of those settings, you should |
| 4 | +" do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten |
| 5 | +" everytime an upgrade of the vim packages is performed. It is recommended to |
| 6 | +" make changes after sourcing debian.vim since it alters the value of the |
| 7 | +" 'compatible' option. |
| 8 | + |
| 9 | +" This line should not be removed as it ensures that various options are |
| 10 | +" properly set to work with the Vim-related packages available in Debian. |
| 11 | +runtime! debian.vim |
| 12 | + |
| 13 | +" Uncomment the next line to make Vim more Vi-compatible |
| 14 | +" NOTE: debian.vim sets 'nocompatible'. Setting 'compatible' changes numerous |
| 15 | +" options, so any other options should be set AFTER setting 'compatible'. |
| 16 | +"set compatible |
| 17 | + |
| 18 | +" Vim5 and later versions support syntax highlighting. Uncommenting the next |
| 19 | +" line enables syntax highlighting by default. |
| 20 | +syntax on |
| 21 | + |
| 22 | +" If using a dark background within the editing area and syntax highlighting |
| 23 | +" turn on this option as well |
| 24 | +"set background=dark |
| 25 | + |
| 26 | +" Uncomment the following to have Vim jump to the last position when |
| 27 | +" reopening a file |
| 28 | +if has("autocmd") |
| 29 | + au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif |
| 30 | +endif |
| 31 | + |
| 32 | +" Uncomment the following to have Vim load indentation rules and plugins |
| 33 | +" according to the detected filetype. |
| 34 | +if has("autocmd") |
| 35 | + filetype plugin indent on |
| 36 | +endif |
| 37 | + |
| 38 | +" The following are commented out as they cause vim to behave a lot |
| 39 | +" differently from regular Vi. They are highly recommended though. |
| 40 | +set showcmd " Show (partial) command in status line. |
| 41 | +set showmatch " Show matching brackets. |
| 42 | +set ignorecase " Do case insensitive matching |
| 43 | +set smartcase " Do smart case matching |
| 44 | +set incsearch " Incremental search |
| 45 | +set autowrite " Automatically save before commands like :next and :make |
| 46 | +"set hidden " Hide buffers when they are abandoned |
| 47 | +"set mouse=a " Enable mouse usage (all modes) |
| 48 | + |
| 49 | +" Source a global configuration file if available |
| 50 | +if filereadable("/etc/vim/vimrc.local") |
| 51 | + source /etc/vim/vimrc.local |
| 52 | +endif |
| 53 | + |
| 54 | +set autoindent |
| 55 | +set cindent |
| 56 | +set smartindent |
| 57 | +set nu |
| 58 | +set tw=78 |
| 59 | +set ts=8 |
| 60 | +set expandtab |
| 61 | + |
| 62 | +"---OmniCppComplete--- |
| 63 | +"--required-- |
| 64 | +"this plugin is used in non-conpatible mode ,so make sure you are . |
| 65 | +set nocp |
| 66 | +"the plugin on is also needed |
| 67 | +filetype plugin on |
| 68 | +"add <F12> to map to excute a action of ctag |
| 69 | +map <C-F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q . <CR> |
| 70 | +map <F3> :Tlist <CR> |
| 71 | +
|
| 72 | +" -- configs -- |
| 73 | + let OmniCpp_MayCompleteDot = 1 " autocomplete with . |
| 74 | + let OmniCpp_MayCompleteArrow = 1 " autocomplete with -> |
| 75 | + let OmniCpp_MayCompleteScope = 1 " autocomplete with :: |
| 76 | + let OmniCpp_SelectFirstItem = 2 " select first item (but don't insert) |
| 77 | + let OmniCpp_NamespaceSearch = 2 " search namespaces in this and included files |
| 78 | + let OmniCpp_ShowPrototypeInAbbr = 1 " show function prototype (i.e. |
| 79 | + "parameters) in popup w |
| 80 | + "close automatically the preview window after a completion |
| 81 | + autocmd CursorMovedI * if pumvisible() == 0|pclose|endif |
| 82 | + autocmd InsertLeave * if pumvisible() == 0|pclose|endif |
| 83 | + |
| 84 | + "ctags for c++ (ominicppcompletion) config |
| 85 | + set tags+=~/.vim/tags/stl/tags |
| 86 | + set tags+=~/.vim/tags/qt4/tags |
| 87 | + |
| 88 | + "taglist |
| 89 | + let Tlist_Use_Right_Window=1 |
| 90 | + let Tlist_File_Fold_Auto_Close=1 |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + "pydiction plugin to auto complete the python scripts |
| 95 | + |
| 96 | + filetype plugin on |
| 97 | + let g:pydiction_location = '~/.vim/tools/pydiction/complete-dict' |
| 98 | + "default g:pydiction_menu_height = 15 |
| 99 | + let g:pydiction_menu_height = 20 |
| 100 | + |
| 101 | + "ctags configuration |
| 102 | + set tags+=./tags,../tags,../../tags |
| 103 | + |
| 104 | + "cscope configuration |
| 105 | + "'casue I have add the plugin cscope_maps.vim in the $HOME/.vim/plugin/ |
| 106 | + "so here it is not configured any more |
| 107 | + map <C-F11> :!cscope -Rbq <CR> |
| 108 | + set cscopetag |
| 109 | + set csto=0 |
| 110 | +" set cscopeverbose |
| 111 | + cs add cscope.out |
| 112 | + |
| 113 | + |
| 114 | +"minibufexploer |
| 115 | + let g:miniBufExplMapWindowNavVim = 1 |
| 116 | + let g:miniBufExplMapWindowNavArrows = 1 |
| 117 | + let g:miniBufExplMapCTabSwitchBufs = 1 |
| 118 | + let g:miniBufExplModSelTarget = 1 |
| 119 | + let g:miniBufExplMoreThanOne=0 |
| 120 | + |
| 121 | +"winmanager |
| 122 | +let g:NERDTree_title="[NERDTree]" |
| 123 | +let g:winManagerWindowLayout="NERDTree|TagList" |
| 124 | + |
| 125 | +function! NERDTree_Start() |
| 126 | + exec 'NERDTree' |
| 127 | +endfunction |
| 128 | + |
| 129 | +function! NERDTree_IsValid() |
| 130 | + return 1 |
| 131 | +endfunction |
| 132 | + |
| 133 | +nmap wm :WMToggle<CR> |
| 134 | +
|
| 135 | + |
| 136 | + "test |
| 137 | +imap myemail1 wolfpythonlondon@gmail.com |
| 138 | +imap myemail2 lyh19901223@gmail.com |
| 139 | +"echo hostname() |
| 140 | +"if hostname() =~ "debian" |
| 141 | +" echo hostname() |
| 142 | +"endif |
| 143 | + |
| 144 | +"set nocompatible " be iMproved |
| 145 | +"filetype off " required! |
| 146 | +set rtp+=~/.vim/bundle/vundle/ |
| 147 | +call vundle#rc() |
| 148 | + |
| 149 | +Bundle 'gmarik/vundle' |
| 150 | + |
| 151 | +"vim scripts repos |
| 152 | +Bundle 'taglist.vim' |
| 153 | +Bundle 'winmanager' |
| 154 | +Bundle 'The-NERD-tree' |
| 155 | +Bundle 'minibufexplorerpp' |
| 156 | +Bundle 'cscope.vim' |
0 commit comments