Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " IMPORTANT
- set nocompatible
- syntax on
- set number
- set autoindent
- set smartindent
- set cinwords+=forn,forab
- set expandtab
- set shiftwidth=4
- set tabstop=4
- set foldenable
- set foldmethod=syntax
- imap jj <esc>
- map <C-J> 5j
- map <C-K> 5k
- au FileType cpp,hpp let $CPPFLAGS='-O2 -DLOCAL -std=c++11 -Wall -Wextra -Wno-unused-result'
- au FileType c,h let $CFLAGS='-std=gnu99'
- map <F9> :w<CR>:make %:r<CR>
- imap <F9> <Esc>:w<CR>:make %:r<CR>
- map <F5> :!./%<<CR>
- imap <F5> :!./%<<CR>
- func! Comment()
- let s = getline(".")
- if s =~ "^//"
- call setline(".", s[2:])
- normal h
- normal h
- else
- call setline(".", "//" . getline("."))
- normal l
- normal l
- endif
- endf
- map gc :call Comment()<Enter>
- map <C-H> <Home>
- map <C-L> <End>
- imap <C-H> <Home>
- imap <C-L> <End>
- imap <C-J> <Down>
- imap <C-K> <Up>
- "autocmd BufNewFile *.cpp :vsplit<CR><C-W>x
- " templates
- "autocmd FileBuf
- " NOT IMPORTANT
- set showcmd
- " autocompletion
- let g:ycm_global_ycm_extra_conf = '/home/zemen/.vim/ycm_extra_conf.py'
- imap {<CR> {<CR>}<Up><Esc>$a<CR>
- if filereadable("vimrc.local")
- source vimrc.local
- endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement