Guest User

Untitled

a guest
Dec 1st, 2014
596
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 3.56 KB | None | 0 0
  1. set ruler
  2. set t_Co=256
  3. set smartindent
  4. set tabstop=4 shiftwidth=4 expandtab
  5. set nocompatible
  6. set backspace=indent,eol,start
  7. set autoread
  8. set autowrite
  9. set wildmenu
  10. set showcmd
  11. set laststatus=2  
  12. set copyindent
  13. "set cmdheight=2
  14. set title
  15.  
  16. set statusline=%f%m%r%h%w\ [%n:%{&ff}/%Y]%=[0x\%04.4B][%03v][%p%%\ line\ %l\ of\ %L]
  17.  
  18.  
  19. filetype off
  20. set rtp+=~.vim/bundle/vundle/
  21. filetype plugin indent on
  22. syntax on
  23. set nu
  24. set autoread
  25. filetype plugin indent on
  26. set relativenumber
  27.  
  28.  
  29. call pathogen#helptags() " generate helptags for evrything in runtimepath
  30. execute pathogen#infect()
  31.  
  32. "let g:kolor_italic=1                    " Enable italic. Default: 1
  33. "let g:kolor_bold=1                      " Enable bold. Default: 1
  34. "let g:kolor_underlined=0                " Enable underline. Default: 0
  35. "let g:kolor_alternative_matchparen=0    " Gray 'MatchParen' color. Default: 0
  36. "colorscheme kolor
  37.  
  38. "Bundle 'davidhalter/jedi-vim'
  39.  
  40. "YCM preview box
  41. autocmd FileType python setlocal completeopt-=preview
  42.  
  43. call vundle#rc()
  44. Plugin 'dag/vim2hs'
  45. Plugin 'eagletmt/neco-ghc'
  46. Plugin 'gmarik/Vundle'
  47. Plugin 'scrooloose/nerdtree'
  48. Plugin 'octol/vim-cpp-enhanced-highlight'
  49. Plugin 'gmarik/Vundle.vim'
  50. "Plugin 'Shougo/neocomplete.vim'
  51. Plugin 'Valloric/YouCompleteMe'
  52. "Plugin 'klen/python-mode'
  53. Plugin 'Shougo/vimshell.vim'
  54.  
  55. "call vundle#end()
  56.  
  57. colorscheme lucius
  58. LuciusLight
  59.  
  60. let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
  61.  
  62. "source ~/.vim/after/plugin/snipMate.vim
  63.  
  64. "Tabs
  65.     noremap <F2> :tabp <CR>
  66.     noremap <F3> :tabn <CR>
  67. "Tabs
  68.  
  69. "Copy all text
  70.     noremap <C-e> :w <CR>
  71.     noremap <C-y> gg"+yG<C-o>    
  72. "Copy all text
  73.  
  74. "abbreviation
  75.     abbr grti template<typename T> inline T grt_i(T a,T b){    return (a%b==0)?(a/b):((a/b)+1);    }
  76. "abbreviation
  77.  
  78. "octave file detect
  79.     " .m files are "octave" files
  80.      augroup filetypedetect
  81.        au! BufRead,BufNewFile *.m, set filetype=octave
  82.      augroup END
  83. "
  84.  
  85. " F5 executes the octave script you are editing
  86.     autocmd FileType octave map <buffer> <f5> ggOpkg load all<esc>Gopause<esc>:w<cr>:!octave -qf %<cr>ddggdd:w<cr>
  87. "
  88.  
  89. " Compile and Run
  90.  
  91.  
  92.  
  93. if expand('%:e')=="cpp"       " C++
  94.     noremap <F8> :!g++ -Wall -g -D LOCAL_SYS -O2 %:t -o %:r  
  95.     noremap <F9> :!ulimit -t 2 ./%:r && ./%:r <CR>
  96.     noremap <F7> :!g++ -Wall -g -D LOCAL_SYS -D DEBUG -O2 %:t -o %:r  
  97.     noremap <F10> :!gdb %:r <CR>
  98. endif
  99.  
  100. if expand('%:e')=="cc"
  101.     noremap <F8> :!g++ -Wall -g -O2 -D DEBUG %:t driver.cc -o %:r
  102.     noremap <F9> :!./%:r <CR>
  103. endif
  104.  
  105. if (expand('%:e'))=="c"         "C
  106.     noremap <F8> :!gcc -Wall -g -O2 %:t -o %:r <CR>
  107.     noremap <F9> :!./%:r <CR>
  108.     noremap <F10> :!gdb %:r <CR>
  109. endif
  110.  
  111. if (expand('%:e'))=="py"        " Python
  112.     noremap <F9> :!python %:t
  113. endif
  114.  
  115. if (expand('%:e'))=="hs"  " Haskell
  116.     noremap <F9> :!ghci  %:t <CR>
  117. endif
  118.  
  119. " End compile and run
  120.  
  121. " Disable AutoComplPop.
  122.  let g:acp_enableAtStartup = 0
  123. " Use neocomplete.
  124.  let g:neocomplete#enable_at_startup = 1
  125. " " Use smartcase.
  126.  let g:neocomplete#enable_smart_case = 1
  127.  
  128.  "Omni-Completion
  129.  autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
  130.  
  131. nnoremap <leader>sv :source $MYVIMRC<cr>
  132. nnoremap <leader>ev :sp $MYVIMRC<cr>
  133.  
  134. noremap <leader>ps <esc>:r ~/.vim/header.cpp<esc>:65<esc>
  135.  
  136. noremap <leader>ca ggdG
  137.  
  138. noremap <leader>g <esc>:56<esc>
  139.  
  140. ":set pastetoggle=<f11>
  141.  
  142. inoremap <c-u> <esc>vbUe<esc>a
  143.  
  144.  
  145. "Training Options
  146. noremap <Up> <NOP>
  147. noremap <Down> <NOP>
  148. noremap <Left> <NOP>
  149. noremap <Down> <NOP>
  150.  
  151. noremap <leader>fn :echo expand('%')<CR>
  152.  
  153. noremap <Esc> <NOP>
Advertisement
Add Comment
Please, Sign In to add comment