Advertisement
Guest User

Untitled

a guest
Jun 13th, 2014
468
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 2.34 KB | None | 0 0
  1. set nocompatible               " be iMproved
  2.  filetype on                   " required!
  3.  filetype plugin on
  4.  
  5. " Make backspace behave in a sane manner.
  6. set backspace=indent,eol,start
  7.  
  8. " set UTF-8 encoding
  9. set enc=utf-8
  10. set fenc=utf-8
  11. set termencoding=utf-8
  12.  
  13. " Switch syntax highlighting on
  14. syntax on
  15.  
  16. " Set to auto read when a file is changed from the outside
  17. set autoread
  18. let mapleader = ","
  19. " in normal mode F3 will save the file
  20. nmap <F3> :w<CR>
  21. " in insert mode F3 will exit insert, save, enters insert again
  22. imap <F3> <ESC>:w<CR>i
  23. " Enable file type detection and do language-dependent indenting.
  24. filetype plugin indent on
  25.  
  26. map <F2> :NERDTreeToggle<CR>
  27.  
  28. " No annoying sound on errors
  29. set noerrorbells
  30. set novisualbell
  31. set t_vb=
  32. set tm=500
  33.  
  34. " Be smart when using tabs ;)
  35. set smarttab
  36. set number
  37. set tabstop=2
  38. set shiftwidth=2
  39. set expandtab
  40. """"""""""""""""""""""""""""""
  41. " => Visual mode related
  42. """"""""""""""""""""""""""""""
  43. " Visual mode pressing * or # searches for the current selection
  44. " Super useful! From an idea by Michael Naumann
  45. vnoremap <silent> * :call VisualSelection('f')<CR>
  46. vnoremap <silent> # :call VisualSelection('b')<CR>
  47.  set rtp+=~/.vim/bundle/vundle/
  48.  call vundle#rc()
  49.  
  50.  " let Vundle manage Vundle
  51.  " required!
  52.  Bundle 'gmarik/vundle'
  53.  Bundle 'scrooloose/nerdtree'
  54.  Bundle 'ervandew/supertab'
  55.  Bundle 'Raimondi/delimitMate'
  56. " Bundle 'msanders/snipmate.vim'
  57. " Bundle 'xuhdev/SingleCompile'
  58.  Bundle 'Valloric/YouCompleteMe'
  59.  Bundle 'mhinz/vim-startify'
  60.  Bundle 'SirVer/ultisnips'
  61.  Bundle 'honza/vim-snippets'
  62. " Bundle 'Rip-Rip/clang_complete'
  63. "nmap <F9> :SCCompile<cr>
  64. "nmap <F10> :SCCompileRun<cr>
  65. colors molokai
  66. set t_Co=256
  67. let g:Powerline_symbols = 'fancy'
  68. set laststatus=2
  69. set noshowmode
  70.  
  71.  
  72. if has('gui_running')
  73.   set guifont=Terminus
  74. endif
  75.  
  76.  
  77. " YouCompleteMe and UltiSnips compatibility, with the helper of supertab
  78. " (via http://stackoverflow.com/a/22253548/1626737)
  79. let g:SuperTabDefaultCompletionType = '<C-n>'
  80. let g:UltiSnipsExpandTrigger = '<tab>'
  81. let g:UltiSnipsJumpForwardTrigger = '<tab>'
  82. let g:UltiSnipsJumpBackwardTrigger = '<s-tab>'
  83. let g:ycm_key_list_select_completion = ['<C-j>', '<C-n>', '<Down>']
  84. let g:ycm_key_list_previous_completion = ['<C-k>', '<C-p>', '<Up>']
  85.  
  86. let g:UltiSnipsSnippetsDir = '~/.vim/ultisnips'
  87. let g:UltiSnipsSnippetDirectories = ['ultisnips']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement