Advertisement
0xl0g1c

.vimrc

Dec 22nd, 2022
445
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 1.29 KB | Source Code | 0 0
  1. filetype on
  2. set clipboard=unnamed
  3. set noswapfile
  4.  
  5. " use ':so %' to refresh .vimrc without restarting vim  
  6. set guifont=JetBrains_Mono:h10
  7. set ruler
  8. set ts=2
  9. set sw=2
  10. set smartindent
  11. set backspace=indent,eol,start
  12.  
  13. " enter fullscreen
  14. au GUIEnter * simalt ~x
  15.  
  16. cd ~/Documents/Code/cpp
  17.  
  18. " key bindings
  19. imap jk <Esc>
  20. inoremap {<CR> {<CR><BS>}<Esc>O
  21. imap <C-BS> <C-W>
  22. noremap <C-a> <Esc>ggVG
  23. syntax enable
  24.  
  25. autocmd filetype cpp nnoremap <F8> :w <bar> !cls && !g++ -g -O2 -std=c++11 % -o %:r -Wl,--stack,268435456<CR>
  26. autocmd filetype cpp nnoremap <F9> :w <bar> !cls && !g++ -g -O2 -std=c++11 % -o %:r -Wl,--stack,268435456 -D DEBUG<CR>
  27. autocmd filetype python nnoremap <F9> :w <bar> !python %:r.py<CR>
  28. autocmd filetype cpp nnoremap <F10> :!%:r <CR>
  29. autocmd filetype java nnoremap <F9> :w <bar> !java %:r<CR>
  30. " Go to C:\MinGW\bin and run mingw-get.exe install gdb
  31. autocmd filetype cpp nnoremap <F11> :w <bar> !gdb %:r<CR>
  32.  
  33. set number
  34. augroup numbertoggle
  35.     autocmd!
  36.     autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
  37.     autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
  38. augroup END
  39.  
  40. autocmd BufNewFile *.cpp 0r ~/Documents/Code/cpp/templ.cpp
  41. autocmd BufNewFile *.cpp norm ggO// Author: Wahyu Priambodo
  42. // Created: :put=strftime('%e %B %Y (%A)')
  43. kJ
  44.  
  45. Gddk
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement