Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set nocompatible " be iMproved, required
- filetype off " required
- let g:ycm_server_python_interpreter = '/usr/bin/python'
- let g:ycm_global_ycm_extra_conf = '~/.vim/.ycm_extra_conf.py'
- map <F3> :ClangFormat<cr>
- map <F2> :YcmCompleter FixIt<cr>b:q<cr>
- let g:clang_format#code_style='llvm'
- let g:clang_format#style_options = {
- \ "Standard" : "C++11",
- \ "TabWidth" : "4",
- \ "UseTab" : "Always"}
- "
- "
- " \ "ColumnLimit": 65}
- "
- " set the runtime path to include Vundle and initialize
- set rtp+=~/.vim/bundle/Vundle.vim
- call vundle#begin()
- " alternatively, pass a path where Vundle should install plugins
- "call vundle#begin('~/some/path/here')
- " let Vundle manage Vundle, required
- Plugin 'VundleVim/Vundle.vim'
- Plugin 'ervandew/supertab'
- Plugin 'Valloric/YouCompleteMe'
- Plugin 'rhysd/vim-clang-format'
- Plugin 'vim-scripts/Conque-GDB'
- Plugin 'vim-latex/vim-latex'
- "Plugin 'SirVer/ultisnips'
- "Plugin 'honza/vim-snippets'
- " The following are examples of different formats supported.
- " Keep Plugin commands between vundle#begin/end.
- " 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#end() " required
- filetype plugin indent on " required
- filetype plugin on
- set grepprg=grep\ -nH\ $*
- filetype indent on
- let g:tex_flavor='latex'
- " To ignore plugin indent changes, instead use:
- "filetype plugin on
- "
- " Brief help
- " :PluginList - lists configured plugins
- " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
- " :PluginSearch foo - searches for foo; append `!` to refresh local cache
- " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
- "
- " see :h vundle for more details or wiki for FAQ
- " Put your non-Plugin stuff after this line
- " If you want :UltiSnipsEdit to split your window.
- "let g:UltiSnipsEditSplit="vertical"
- " make YCM compatible with UltiSnips (using supertab)
- let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
- let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
- let g:SuperTabDefaultCompletionType = '<C-n>'
- let g:ycm_autoclose_preview_window_after_completion=1
- " better key bindings for UltiSnipsExpandTrigger
- inoremap <S-F1> <c-r>=UltiSnips#ExpandSnippet()<cr>
- let g:UltiSnipsExpandTrigger = "<S-F1>"
- let g:UltiSnipsJumpForwardTrigger = "<tab>"
- let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
- set number
- set backspace=2
- set guioptions+=m
- set tabstop=4
- set shiftwidth=4
- set backspace=indent,eol,start
- "function Q
- " :mks! s1.vim
- " :xa
- "endf
- "let @q=':mks! s1.vim<cr>:xa<cr>'
- function! Exit(fileName)
- "normal :mks! s2.vim^M:xa^M
- execute 'mks!' a:fileName
- normal :xa
- endfunction
- command Q call Exit("s1.vim")
- command QQ call Exit("s2.vim")
- let @w='^yf;hp==f(B"ppa::f;xa{}i
- O'
- let @e='^yf;hp==f(B"pPa::f;xa{}i
- O'
- nnoremap <left> <nop>
- nnoremap <right> <nop>
- nnoremap <up> <nop>
- nnoremap <down> <nop>
- inoremap <left> <nop>
- inoremap <right> <nop>
- inoremap <up> <nop>
- inoremap <down> <nop>
- map <silent> <S-F12> mm^i//<esc>`mll
- map <silent> <S-F11> mm:s/\/\//<cr>:<esc>`mhh:nohl<cr>
- map <F9> :wa<cr>:!make<cr>
- noremap <silent> <Leader>vs :<C-u>let @z=&so<CR>:set so=0 noscb<CR>:bo vs<CR>Ljzt:setl scb<CR><C-w>p:setl scb<CR>:let &so=@z<CR>
- if has("vms")
- set nobackup " do not keep a backup file, use versions instead
- else
- set backup " keep a backup file
- endif
- set history=1000 " keep 1000 lines of command line history
- set ruler " show the cursor position all the time
- set showcmd " display incomplete commands
- set incsearch " do incremental searching
- " leave insert mode quickly
- if ! has('gui_running')
- set ttimeoutlen=10
- augroup FastEscape
- autocmd!
- au InsertEnter * set timeoutlen=0
- au InsertLeave * set timeoutlen=1000
- augroup END
- endif
- if has("autocmd")
- au VimEnter,InsertLeave * silent execute '!echo -ne "\e[2 q"'
- "au InsertLeave * cal cursor(line("."), col(".")+1)
- au InsertEnter,InsertChange *
- \ if v:insertmode == 'i' |
- \ silent execute '!echo -ne "\e[6 q"' |
- \ elseif v:insertmode == 'r' |
- \ silent execute '!echo -ne "\e[4 q"' |
- \ endif
- au VimLeave * silent execute '!echo -ne "\e[ q"'
- endif
- " Don't use Ex mode, use Q for formatting
- map Q gq
- " CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
- " so that you can undo CTRL-U after inserting a line break.
- inoremap <C-U> <C-G>u<C-U>
- " In many terminal emulators the mouse works just fine, thus enable it.
- if has('mouse')
- set mouse=a
- endif
- " Switch syntax highlighting on, when the terminal has colors
- " Also switch on highlighting the last used search pattern.
- if &t_Co > 2 || has("gui_running")
- syntax on
- set hlsearch
- endif
- " 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")
- " Convenient command to see the difference between the current buffer and the
- " file it was loaded from, thus the changes you made.
- " Only define it when not defined already.
- if !exists(":DiffOrig")
- command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
- \ | wincmd p | diffthis
- endif
- autocmd VimLeave * call system("xsel -ib", getreg('+')) "keep system clipboard after exit vim(handmade)
- set langmap=ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement