Combothermal

Combothermal vimrc

Mar 29th, 2020
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. set tabstop=4
  2. set nocompatible
  3. set shiftwidth=4
  4. set expandtab
  5. set autoindent
  6. set smartindent
  7. set ruler
  8. set showcmd
  9. set incsearch
  10. set shellslash
  11. set number
  12. set relativenumber
  13. set cino+=L0
  14.  
  15. colorscheme badwolf "either install badwolf or replace this with a default colorscheme--I recommend desert (assuming you're using gvim)
  16.  
  17. syntax on
  18. filetype indent on
  19.  
  20. "keybindings for { completion, "jk" for escape, ctrl-a to select all
  21. inoremap {<CR> {<CR>}<Esc>O
  22. inoremap {} {}
  23. imap jk <Esc>
  24. map <C-a> <esc>ggVG<CR>
  25. set belloff=all
  26.  
  27. autocmd BufNewFile *.cpp 0r INSERTPATHTOYOURTEMPLATEFILEHERE "autofills new C++ files with your template
  28. autocmd filetype cpp nnoremap <F9> :w <bar> !g++.exe -static -DONLINE_JUDGE -lm -s -x c++ -Wl,--stack=268435456 -Wall -Wextra -O2 -std=c++11 -D__USE_MINGW_ANSI_STDIO=0 -o %:r.exe %:r.cpp <CR> "F9 to compile
  29. autocmd filetype cpp nnoremap <F10> :!%:r<CR> "F10 to run
  30.  
  31. "tip: use a folder for competitive programming, with subfolders for each contest and a subfolder for your library.
  32. "then, to insert library code, do :r ../Library/FILENAME.cpp
Advertisement
Add Comment
Please, Sign In to add comment