Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set tabstop=4
- set nocompatible
- set shiftwidth=4
- set expandtab
- set autoindent
- set smartindent
- set ruler
- set showcmd
- set incsearch
- set shellslash
- set number
- set relativenumber
- set cino+=L0
- colorscheme badwolf "either install badwolf or replace this with a default colorscheme--I recommend desert (assuming you're using gvim)
- syntax on
- filetype indent on
- "keybindings for { completion, "jk" for escape, ctrl-a to select all
- inoremap {<CR> {<CR>}<Esc>O
- inoremap {} {}
- imap jk <Esc>
- map <C-a> <esc>ggVG<CR>
- set belloff=all
- autocmd BufNewFile *.cpp 0r INSERTPATHTOYOURTEMPLATEFILEHERE "autofills new C++ files with your template
- 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
- autocmd filetype cpp nnoremap <F10> :!%:r<CR> "F10 to run
- "tip: use a folder for competitive programming, with subfolders for each contest and a subfolder for your library.
- "then, to insert library code, do :r ../Library/FILENAME.cpp
Advertisement
Add Comment
Please, Sign In to add comment