1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
| " Basis "set cul set nowrap set mouse=a "set paste set history=1000 set bg=dark syntax on set ai set cin set sw=2 set sts=2 set ts=2 set nu set si set sm set nobk "set guioptions-=T "set guioptions-=m set ignorecase smartcase set vb t_vb= set ruler set magic set nohls set incsearch set et set sta "set spell "set ww=b,s,h,l,<,>,~,[,] set encoding=utf-8 set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1 set ambiwidth=double set cino=:0g0t0(sus set selection=inclusive set keymodel=startsel,stopsel "set wildmenu "set cmdheight=1 "set laststatus=2 "set statusline=\ %<%F[%1<em>%M%</em>%n%R%H]%=\ %y\ %0(%{&fileformat}\ %{&encoding}\ %l/%L:%c%) "set foldenable "set foldmethod=syntax "set foldcolumn=0 "setlocal foldlevel=1 "set foldclose=all "nnoremap <space> @=((foldclosed(line('.')) < -3) ? 'zc' : 'zo')<cr> colorscheme delek</cr></space>
" Plugins set nocp filetype off
" set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim call vundle " alternatively, pass a path where Vundle should install plugins "call vundle
" let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim' Plugin 'sCRooloose/nerdtree' Plugin 'Valloric/YouCompleteMe' Plugin 'vim-syntastic/syntastic' Plugin 'easymotion/vim-easymotion' Plugin 'fholgado/minibufexpl.vim' Plugin 'vim-airline/vim-airline' Plugin 'vim-sCRipts/taglist.vim' Plugin 'majutsushi/tagbar' Plugin 'Yggdroot/indentLine' Plugin 'Yggdroot/vim-mark' Plugin 'kien/ctrlp.vim' Plugin 'sCRooloose/nerdcommenter' Plugin 'sjl/gundo.vim' Plugin 'godlygeek/tabular'
" The following are examples of different formats supported. " Keep Plugin commands between vundle " plugin on GitHub repo "Plugin 'tpope/vim-fugitive' " plugin from http://vim-sCRipts.org/vim/sCRipts.html "Plugin 'L9' " Git plugin not hosted on GitHub "Plugin 'git://git.wincent.com/command-t.git' " git repos on your local machine (i.e. when working on your own plugin) "Plugin 'file:///home/gmarik/path/to/plugin' " The sparkup vim sCRipt is in a subdirectory of this repo called vim. " Pass the path to set the runtimepath properly. "Plugin 'rstaCRuz/sparkup', {'rtp': 'vim/'} " Install L9 and avoid a Naming conflict if you've already installed a " different version somewhere else. "Plugin 'ascenator/L9', {'name': 'newL9'}
" All of your Plugins must be added before the following line call vundle filetype plugin indent on " required " To ignore plugin indent changes, instead use: "filetype plugin on " " Brief help " :PluginList - lists configured plugins " :PluginInstall - installs plugins " :PluginSearch foo - searches for foo " :PluginClean - confirms removal of unused plugins " " see :h vundle for more details or wiki for FAQ " Put your non-Plugin stuff after this line
let mapleader=","
let g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py' nnoremap <leader>gt :YcmCompleter GoToDefinitionElseDeclaration<cr></cr></leader>
let g:EasyMotion_smartcase = 1 nnoremap <leader><leader>h <plug>(easymotion-linebackward) nnoremap <leader><leader>j <plug>(easymotion-j) nnoremap <leader><leader>k <plug>(easymotion-k) nnoremap <leader><leader>l <plug>(easymotion-lineforward) nnoremap <leader><leader>. <plug>(easymotion-repeat)</plug></leader></leader></plug></leader></leader></plug></leader></leader></plug></leader></leader></plug></leader></leader>
let g:syntastic_enable_signs = 1 let g:syntastic_error_symbol = '!' let g:syntastic_warning_symbol = '?' let g:syntastic_check_on_open = 1 let g:syntastic_check_on_wq = 0 let g:syntastic_enable_highlighting = 1
nnoremap <leader>a= :Tabularize /=<cr> vnoremap <leader>a= :Tabularize /=<cr> nnoremap <leader>a: :Tabularize /:\zs<cr> vnoremap <leader>a: :Tabularize /:\zs<cr></cr></leader></cr></leader></cr></leader></cr></leader>
nnoremap <f2> :NERDTreeToggle<cr> nnoremap <f3> :TlistToggle<cr> nnoremap <f4> :TagbarToggle<cr> nnoremap <f5> :GundoToggle<cr> nnoremap <f7> :w<cr>:!clang++ -std=c++11 % -o %< && time ./%<<cr> nnoremap <f9> :MBEbp<cr> nnoremap <f10> :MBEbn<cr></cr></f10></cr></f9></cr></cr></f7></cr></f5></cr></f4></cr></f3></cr></f2>
inoremap inoremap ' <c-r>=QuoteDelim("'")<cr><esc>a inoremap " <c-r>=QuoteDelim('"')<cr><esc>a inoremap ( ()<esc>i inoremap ) <c-r>=ClosePair(')')<cr><esc>a inoremap [ []<esc>i inoremap ] <c-r>=ClosePair(']')<cr><esc>a inoremap { {<cr>}<esc>O "inoremap } <c-r>=CloseBracket()<cr></cr></c-r></esc></cr></esc></cr></c-r></esc></esc></cr></c-r></esc></esc></cr></c-r></esc></cr></c-r></esc>
function ClosePair(char) if getline('.')[col('.') - 1] == a:char return "\<right>" else return a:char endif endf</right>
function CloseBracket() if match(getline(line('.') + 1), '\s*}') < 0 return "\<cr>}" else return "\<esc>j0f}a" endif endf</esc></cr>
function QuoteDelim(char) let line = getline('.') let col = col('.') if line[col - 2] == "\" return a:char elseif line[col - 1] == a:char return "\<right>" else return a:char.a:char."\<esc>i" endif endf
|