Advertisement
Guest User

Untitled

a guest
Sep 1st, 2015
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. " IMPORTANT
  2.  
  3. set nocompatible
  4.  
  5. syntax on
  6. set number
  7. set autoindent
  8. set smartindent
  9. set cinwords+=forn,forab
  10.  
  11. set expandtab
  12. set shiftwidth=4
  13. set tabstop=4
  14.  
  15. set foldenable
  16. set foldmethod=syntax
  17.  
  18. imap jj <esc>
  19. map <C-J> 5j
  20. map <C-K> 5k
  21.  
  22. au FileType cpp,hpp let $CPPFLAGS='-O2 -DLOCAL -std=c++11 -Wall -Wextra -Wno-unused-result'
  23. au FileType c,h let $CFLAGS='-std=gnu99'
  24.  
  25. map <F9> :w<CR>:make %:r<CR>
  26. imap <F9> <Esc>:w<CR>:make %:r<CR>
  27.  
  28. map <F5> :!./%<<CR>
  29. imap <F5> :!./%<<CR>
  30.  
  31. func! Comment()
  32. let s = getline(".")
  33. if s =~ "^//"
  34. call setline(".", s[2:])
  35. normal h
  36. normal h
  37. else
  38. call setline(".", "//" . getline("."))
  39. normal l
  40. normal l
  41. endif
  42. endf
  43. map gc :call Comment()<Enter>
  44.  
  45. map <C-H> <Home>
  46. map <C-L> <End>
  47. imap <C-H> <Home>
  48. imap <C-L> <End>
  49. imap <C-J> <Down>
  50. imap <C-K> <Up>
  51.  
  52. "autocmd BufNewFile *.cpp :vsplit<CR><C-W>x
  53.  
  54. " templates
  55. "autocmd FileBuf
  56.  
  57. " NOT IMPORTANT
  58.  
  59. set showcmd
  60.  
  61. " autocompletion
  62. let g:ycm_global_ycm_extra_conf = '/home/zemen/.vim/ycm_extra_conf.py'
  63.  
  64. imap {<CR> {<CR>}<Up><Esc>$a<CR>
  65.  
  66. if filereadable("vimrc.local")
  67. source vimrc.local
  68. endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement