Advertisement
Guest User

Untitled

a guest
Nov 16th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.02 KB | None | 0 0
  1. set nocompatible " be iMproved, required
  2. filetype off " required
  3.  
  4. let g:ycm_server_python_interpreter = '/usr/bin/python'
  5. let g:ycm_global_ycm_extra_conf = '~/.vim/.ycm_extra_conf.py'
  6. map <F3> :ClangFormat<cr>
  7. map <F2> :YcmCompleter FixIt<cr>b:q<cr>
  8. let g:clang_format#code_style='llvm'
  9. let g:clang_format#style_options = {
  10. \ "Standard" : "C++11",
  11. \ "TabWidth" : "4",
  12. \ "UseTab" : "Always"}
  13. "
  14. "
  15. " \ "ColumnLimit": 65}
  16. "
  17. " set the runtime path to include Vundle and initialize
  18. set rtp+=~/.vim/bundle/Vundle.vim
  19. call vundle#begin()
  20. " alternatively, pass a path where Vundle should install plugins
  21. "call vundle#begin('~/some/path/here')
  22.  
  23. " let Vundle manage Vundle, required
  24. Plugin 'VundleVim/Vundle.vim'
  25.  
  26. Plugin 'ervandew/supertab'
  27. Plugin 'Valloric/YouCompleteMe'
  28. Plugin 'rhysd/vim-clang-format'
  29. Plugin 'vim-scripts/Conque-GDB'
  30. Plugin 'vim-latex/vim-latex'
  31. "Plugin 'SirVer/ultisnips'
  32. "Plugin 'honza/vim-snippets'
  33.  
  34. " The following are examples of different formats supported.
  35. " Keep Plugin commands between vundle#begin/end.
  36. " plugin on GitHub repo
  37. "Plugin 'tpope/vim-fugitive'
  38. " plugin from http://vim-scripts.org/vim/scripts.html
  39. " Plugin 'L9'
  40. " Git plugin not hosted on GitHub
  41. "Plugin 'git://git.wincent.com/command-t.git'
  42. " git repos on your local machine (i.e. when working on your own plugin)
  43. "Plugin 'file:///home/gmarik/path/to/plugin'
  44. " The sparkup vim script is in a subdirectory of this repo called vim.
  45. " Pass the path to set the runtimepath properly.
  46. "Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
  47. " Install L9 and avoid a Naming conflict if you've already installed a
  48. " different version somewhere else.
  49. " Plugin 'ascenator/L9', {'name': 'newL9'}
  50.  
  51. " All of your Plugins must be added before the following line
  52. call vundle#end() " required
  53. filetype plugin indent on " required
  54. filetype plugin on
  55. set grepprg=grep\ -nH\ $*
  56. filetype indent on
  57. let g:tex_flavor='latex'
  58. " To ignore plugin indent changes, instead use:
  59. "filetype plugin on
  60. "
  61. " Brief help
  62. " :PluginList - lists configured plugins
  63. " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
  64. " :PluginSearch foo - searches for foo; append `!` to refresh local cache
  65. " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
  66. "
  67. " see :h vundle for more details or wiki for FAQ
  68. " Put your non-Plugin stuff after this line
  69.  
  70. " If you want :UltiSnipsEdit to split your window.
  71. "let g:UltiSnipsEditSplit="vertical"
  72.  
  73. " make YCM compatible with UltiSnips (using supertab)
  74. let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
  75. let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
  76. let g:SuperTabDefaultCompletionType = '<C-n>'
  77. let g:ycm_autoclose_preview_window_after_completion=1
  78.  
  79. " better key bindings for UltiSnipsExpandTrigger
  80. inoremap <S-F1> <c-r>=UltiSnips#ExpandSnippet()<cr>
  81. let g:UltiSnipsExpandTrigger = "<S-F1>"
  82. let g:UltiSnipsJumpForwardTrigger = "<tab>"
  83. let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
  84. set number
  85. set backspace=2
  86. set guioptions+=m
  87.  
  88. set tabstop=4
  89. set shiftwidth=4
  90.  
  91. set backspace=indent,eol,start
  92.  
  93. "function Q
  94. " :mks! s1.vim
  95. " :xa
  96. "endf
  97.  
  98. "let @q=':mks! s1.vim<cr>:xa<cr>'
  99.  
  100. function! Exit(fileName)
  101. "normal :mks! s2.vim^M:xa^M
  102. execute 'mks!' a:fileName
  103. normal :xa
  104. endfunction
  105.  
  106. command Q call Exit("s1.vim")
  107. command QQ call Exit("s2.vim")
  108.  
  109. let @w='^yf;hp==f(B"ppa::f;xa{}i
  110. O'
  111. let @e='^yf;hp==f(B"pPa::f;xa{}i
  112. O'
  113.  
  114. nnoremap <left> <nop>
  115. nnoremap <right> <nop>
  116. nnoremap <up> <nop>
  117. nnoremap <down> <nop>
  118.  
  119. inoremap <left> <nop>
  120. inoremap <right> <nop>
  121. inoremap <up> <nop>
  122. inoremap <down> <nop>
  123.  
  124. map <silent> <S-F12> mm^i//<esc>`mll
  125. map <silent> <S-F11> mm:s/\/\//<cr>:<esc>`mhh:nohl<cr>
  126. map <F9> :wa<cr>:!make<cr>
  127.  
  128. 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>
  129.  
  130. if has("vms")
  131. set nobackup " do not keep a backup file, use versions instead
  132. else
  133. set backup " keep a backup file
  134. endif
  135. set history=1000 " keep 1000 lines of command line history
  136. set ruler " show the cursor position all the time
  137. set showcmd " display incomplete commands
  138. set incsearch " do incremental searching
  139.  
  140.  
  141. " leave insert mode quickly
  142. if ! has('gui_running')
  143. set ttimeoutlen=10
  144. augroup FastEscape
  145. autocmd!
  146. au InsertEnter * set timeoutlen=0
  147. au InsertLeave * set timeoutlen=1000
  148. augroup END
  149. endif
  150.  
  151. if has("autocmd")
  152. au VimEnter,InsertLeave * silent execute '!echo -ne "\e[2 q"'
  153. "au InsertLeave * cal cursor(line("."), col(".")+1)
  154. au InsertEnter,InsertChange *
  155. \ if v:insertmode == 'i' |
  156. \ silent execute '!echo -ne "\e[6 q"' |
  157. \ elseif v:insertmode == 'r' |
  158. \ silent execute '!echo -ne "\e[4 q"' |
  159. \ endif
  160. au VimLeave * silent execute '!echo -ne "\e[ q"'
  161. endif
  162.  
  163. " Don't use Ex mode, use Q for formatting
  164. map Q gq
  165.  
  166. " CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
  167. " so that you can undo CTRL-U after inserting a line break.
  168. inoremap <C-U> <C-G>u<C-U>
  169.  
  170. " In many terminal emulators the mouse works just fine, thus enable it.
  171. if has('mouse')
  172. set mouse=a
  173. endif
  174.  
  175. " Switch syntax highlighting on, when the terminal has colors
  176. " Also switch on highlighting the last used search pattern.
  177. if &t_Co > 2 || has("gui_running")
  178. syntax on
  179. set hlsearch
  180. endif
  181.  
  182. " Only do this part when compiled with support for autocommands.
  183. if has("autocmd")
  184.  
  185. " Enable file type detection.
  186. " Use the default filetype settings, so that mail gets 'tw' set to 72,
  187. " 'cindent' is on in C files, etc.
  188. " Also load indent files, to automatically do language-dependent indenting.
  189. filetype plugin indent on
  190.  
  191. " Put these in an autocmd group, so that we can delete them easily.
  192. augroup vimrcEx
  193. au!
  194.  
  195. " For all text files set 'textwidth' to 78 characters.
  196. autocmd FileType text setlocal textwidth=78
  197.  
  198. " When editing a file, always jump to the last known cursor position.
  199. " Don't do it when the position is invalid or when inside an event handler
  200. " (happens when dropping a file on gvim).
  201. " Also don't do it when the mark is in the first line, that is the default
  202. " position when opening a file.
  203. autocmd BufReadPost *
  204. \ if line("'\"") > 1 && line("'\"") <= line("$") |
  205. \ exe "normal! g`\"" |
  206. \ endif
  207.  
  208. augroup END
  209.  
  210. else
  211.  
  212. set autoindent " always set autoindenting on
  213.  
  214. endif " has("autocmd")
  215.  
  216. " Convenient command to see the difference between the current buffer and the
  217. " file it was loaded from, thus the changes you made.
  218. " Only define it when not defined already.
  219. if !exists(":DiffOrig")
  220. command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
  221. \ | wincmd p | diffthis
  222. endif
  223.  
  224. autocmd VimLeave * call system("xsel -ib", getreg('+')) "keep system clipboard after exit vim(handmade)
  225. set langmap=ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKLMNOPQRSTUVWXYZ,фисвуапршолдьтщзйкыегмцчня;abcdefghijklmnopqrstuvwxyz
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement