Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 3.91 KB | None | 0 0
  1. filetype off
  2. filetype indent on
  3. "set t_Co=256
  4. set guifont=InconsolataForPowerline\ Nerd\ Font\ 12
  5. set laststatus=2
  6. set backspace=indent,eol,start
  7. set clipboard=unnamedplus
  8. set encoding=utf-8
  9. set ai
  10. set showmatch
  11. set textwidth=79
  12.  
  13. " this desable "visual" wrapping
  14. set nowrap
  15. set textwidth=0 wrapmargin=0
  16.  
  17. set mouse=a
  18. set nu
  19. set expandtab
  20. set tabstop=4
  21. set shiftwidth=4
  22. set nobackup
  23. set noswapfile
  24. set nowritebackup
  25. set timeoutlen=1000
  26. set ttimeoutlen=0
  27. set showcmd
  28. set ignorecase
  29. set smartcase
  30. set cursorline
  31.  
  32. let g:airline_theme='gruvbox'
  33. let g:airline_powerline_fonts=1
  34. let g:gruvbox_contrast_dark='neutral'
  35. colorscheme gruvbox
  36. "Tomorrow-Night-Eighties
  37. set background=dark
  38.  
  39. "VIM-Jedi
  40. let g:jedi#completions_command = "<C-Space>"
  41. let g:jedi#popup_on_dot = 0
  42. let g:jedi#popup_select_first = 0
  43. let g:jedi#show_call_signatures = "1"
  44. "FileType
  45. autocmd FileType haskell map <F5> :!ghci %
  46. autocmd FileType haskell imap <F5> <ESC> :!ghci
  47.  
  48. autocmd FileType python setlocal completeopt-=preview
  49. autocmd FileType python map <F5> :!python3 %
  50. autocmd FileType python imap <F5> <ESC> :!python3 %
  51.  
  52. autocmd FileType cpp map <F5> :!g++ % && ./a.out
  53. autocmd FileType cpp imap <F5> <ESC> :!g++ % && ./a.out
  54.  
  55. autocmd FileType go map <F5> :!go run %
  56. autocmd FileType go imap <F5> <ESC> :!go run %
  57.  
  58. autocmd FileType html setlocal shiftwidth=2 tabstop=2
  59.  
  60. "My mapping keys
  61. nnoremap <C-c> "+y
  62. vnoremap <C-c> "+y
  63. vnoremap <C-v> c<ESC>"+p
  64. inoremap <C-v> <ESC>"+pa
  65. nnoremap <C-v> "+pa
  66. vmap <S-TAB> <
  67. vmap <TAB> >
  68. imap jj <ESC>
  69. nmap <C-s> :w <CR>
  70. imap <C-s> <Esc> :w <CR>
  71. map c <Esc>:
  72. vmap n <Esc>
  73. map <F1> :sp <CR>
  74. map <F2> :vsp <CR>
  75. nmap <F3> :%!xxd <CR>
  76. nmap <F4> :%!xxd -r <CR>
  77. nmap <S-l> $
  78. nmap <S-h> 0"
  79.  
  80. nnoremap <C-J> <C-W><C-J>
  81. nnoremap <C-K> <C-W><C-K>
  82. nnoremap <C-L> <C-W><C-L>
  83. nnoremap <C-H> <C-W><C-H>
  84.  
  85. if !exists('g:airline_symbols')
  86.     let g:airline_symbols = {}
  87. endif
  88.  
  89. " unicode symbols
  90. let g:airline_symbols.paste = 'ρ'
  91. let g:airline_symbols.paste = 'Þ'
  92. let g:airline_symbols.paste = '∥'
  93. let g:airline_symbols.whitespace = 'Ξ'
  94. let g:airline_symbols.maxlinenr = ''
  95. let g:airline_symbols.spell = 'Ꞩ'
  96. let g:airline_symbols.notexists = '∄'
  97.  
  98. " powerline symbols
  99. let g:airline_left_sep = ''
  100. let g:airline_left_alt_sep = ''
  101. let g:airline_right_sep = ''
  102. let g:airline_right_alt_sep = ''
  103. let g:airline_symbols.branch = ''
  104. let g:airline_symbols.readonly = ''
  105. let g:airline_symbols.linenr = ''
  106.  
  107. " Smarter tab line
  108. let g:airline#extensions#tabline#enabled = 1
  109. let g:airline#extensions#tabline#show_buffers = 1
  110. let g:airline#extensions#tabline#tab_min_count = 2
  111.  
  112. " tabs
  113. set switchbuf=usetab
  114. nnoremap <Right> :sbnext<CR>
  115. nnoremap <Left> :sbprevious<CR>
  116.  
  117. " set the runtime path to include Vundle and initialize
  118. set rtp+=~/.vim/bundle/Vundle.vim
  119. call vundle#begin()
  120.  
  121. Plugin 'VundleVim/Vundle.vim'
  122. Plugin 'tpope/vim-fugitive'
  123. Plugin 'L9'
  124. Plugin 'git://git.wincent.com/command-t.git'
  125. Plugin 'file:///home/gmarik/path/to/plugin'
  126. Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
  127. Plugin 'ascenator/L9', {'name': 'newL9'}
  128. "-----------------------------------------
  129. Plugin 'othree/html5.vim'
  130. Plugin 'flazz/vim-colorschemes'
  131. Plugin 'scrooloose/nerdTree'
  132. Plugin 'ryanoasis/vim-devicons'
  133. Plugin 'vim-airline/vim-airline'
  134. Plugin 'vim-airline/vim-airline-themes'
  135. Plugin 'davidhalter/jedi-vim'
  136. Plugin 'wkentaro/conque.vim'
  137. Plugin 'morhetz/gruvbox'
  138. Plugin 'dracula/vim'
  139.  
  140. call vundle#end()            " required
  141. filetype plugin indent on    " required
  142.  
  143. if has("syntax")
  144.     syntax on
  145. endif
  146.  
  147. if &term =~ "xterm\\|rxvt"
  148.   " use an orange cursor in insert mode
  149.   let &t_SI = "\<Esc>]12;orange\x7"
  150.   " use a red cursor otherwise
  151.   let &t_EI = "\<Esc>]12;gray\x7"
  152.   silent !echo -ne "\033]12;gray\007"
  153.   " reset cursor when vim exits
  154.   autocmd VimLeave * silent !echo -ne "\033]112\007"
  155.   " use \003]12;gray\007 for gnome-terminal and rxvt up to version 9.21
  156. endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement