Advertisement
mdsiaofficial

Untitled

Sep 25th, 2022
493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 3.97 KB | None | 0 0
  1. colorscheme jellybeans
  2. "colo desert
  3. "colo darkblue
  4.  
  5.  
  6. "set exrc
  7.  
  8.  
  9. noremap <F1> <ESC>:tabprev <CR>
  10. vnoremap <F1> <ESC>:tabprev <CR>
  11. inoremap <F1> <ESC>
  12.  
  13. noremap <F3> <ESC> :w <CR> :make <CR>
  14. inoremap <F3> <ESC> :w <CR> :make <CR>
  15.  
  16. "noremap <F4> <ESC> :w <CR> :!pycodestyle %<.py <CR>
  17. "inoremap <F4> <ESC> :w <CR> :!pycodestyle %<.py <CR>
  18.  
  19. "noremap <F5> <ESC> :w <CR> :!pytest %<.py <CR>
  20. "inoremap <F5> <ESC> :w <CR> :!pytest %<.py <CR>
  21.  
  22. "noremap <F6> <ESC> :!./%< < inp<CR>
  23. "inoremap <F6> <ESC> :!./%< < inp<CR>
  24.  
  25. noremap <F7> <ESC> :w !python3 <CR>
  26.  
  27. "noremap <F7> <ESC> :w <CR> :!avr-gcc -g -std=c99 -O1 -mmcu=atmega328p -o out.elf example.c<CR>
  28. "noremap <F6> <ESC> :w <CR> :!avrdude -v -patmega328p -P /dev/cu.usbmodem14* -c arduino -U flash:w:"out.elf"<CR>
  29. "noremap <F5> <ESC> :w <CR> :!avrdude -v -patmega328p -P /dev/cu.usbmodemHID* -c arduino -U flash:w:"out.elf"<CR>
  30.  
  31.  
  32. noremap <F8> <ESC> :w <CR> :!g++ -fsanitize=address -std=c++17 -DONPC -O2 -o %< % && ./%< < inp<CR>
  33. inoremap <F8> <ESC> :w <CR> :!g++ -fsanitize=address -std=c++17 -DONPC -O2 -o "%<" "%" && "./%<" < inp<CR>
  34.  
  35. " -pthread
  36.  
  37. noremap <F9> <ESC> :w <CR> :!g++ -fsanitize=address -std=c++17 -Wall -Wextra -Wshadow -DONPC -O2 -o %< % && ./%< <CR>
  38. inoremap <F9> <ESC> :w <CR> :!g++ -fsanitize=address -std=c++17 -Wall -Wextra -Wshadow -DONPC -O2 -o %< % && ./%< <CR>
  39.  
  40. "noremap <F10> <ESC> :w <CR> :!clang++ -fsanitize=address -std=c++17 -Wall -Wextra -Wshadow -DONPC -O2 -o %< % && ./%< <CR>
  41. "inoremap <F10> <ESC> :w <CR> :!clang++ -fsanitize=address -std=c++17 -Wall -Wextra -Wshadow -DONPC -O2 -o %< % && ./%< <CR>
  42.  
  43.  
  44. noremap <F10> <ESC> :w <CR> :!g++ -fsanitize=address -std=c++17 -Wall -Wextra -Wshadow -DONPC -O2 -o %< % && ./%< < inp<CR>
  45. inoremap <F10> <ESC> :w <CR> :!g++ -fsanitize=address -std=c++17 -Wall -Wextra -Wshadow -DONPC -O2 -o "%<" "%" && "./%<" < inp<CR>
  46.  
  47.  
  48.  
  49. "inoremap {<CR> {<CR>}<ESC>k$A<CR>
  50.  
  51. noremap <TAB> %
  52.  
  53.  
  54. call plug#begin('~/.vim/plugged')
  55.  
  56.  
  57. Plug 'lervag/vimtex'
  58. let g:tex_flavor='latex'
  59. let g:vimtex_view_method='general'
  60. let g:vimtex_quickfix_mode=0
  61. set conceallevel=1
  62. let g:tex_conceal='abdmg'
  63.  
  64. Plug 'sirver/ultisnips'
  65. let g:UltiSnipsExpandTrigger = '<tab>'
  66. let g:UltiSnipsJumpForwardTrigger = '<tab>'
  67. let g:UltiSnipsJumpBackwardTrigger = '<s-tab>'
  68. "let g:UltiSnipsJumpForwardTrigger="<c-b>"
  69. "let g:UltiSnipsJumpBackwardTrigger="<c-z>"
  70. "let g:UltiSnipsEditSplit="vertical"
  71.  
  72. Plug 'honza/vim-snippets'
  73.  
  74. "Plug 'gilligan/vim-lldb'
  75.  
  76. call plug#end()
  77. ":PlugInstall
  78.  
  79.  
  80.  
  81.  
  82. let c_syntax_for_h=""
  83.  
  84. let g:netrw_keepdir = 0
  85.  
  86. let g:netrw_localrmdir='rm -r'
  87.  
  88. let mapleader = "\<Space>"
  89. noremap <Leader>b ^
  90. noremap <Leader>e <ESC>:e .<CR>
  91. noremap <Leader>r <C-R>
  92. noremap <Leader>j <C-W><C-J>
  93. noremap <Leader>u i_<ESC>r
  94. noremap <Leader>n :vs
  95. noremap <Leader>q :q<CR>
  96. noremap <Leader>o <C-O>
  97. noremap <Leader>i <C-I>
  98. noremap <Leader>a ggVG
  99. noremap <Leader>/ 0i//<ESC>
  100. noremap <Leader>s :source ~/.vimrc <CR>
  101.  
  102. command! Prog :e ~/Documents/programming/
  103. command! SP :e ~/Documents/SPBU_SP_6_term/
  104. command! Kek source ~/.vimrc
  105. "autocmd FocusLost * redraw!
  106. "command! LLDB :!clang++ -fsanitize=address -std=c++17 -O0 -g -o "%<" "%" && lldb %<
  107. command! Gdb !g++ -std=c++17 -O0 -g -o %<
  108.  
  109.  
  110. set autoindent
  111. set autoread
  112. set cin
  113. set expandtab
  114. set guifont=Menlo\ Regular:h16
  115. set history=1000
  116. set hlsearch
  117. set ignorecase
  118. set incsearch
  119. set mousehide
  120. set noerrorbells
  121. set noswapfile
  122. set number
  123. set pastetoggle=
  124. set shiftwidth=4
  125. set smarttab
  126. set tabstop=4
  127. set vb t_vb=
  128. "set relativenumber
  129.  
  130. filetype on
  131. filetype plugin on
  132. autocmd FileType cpp setlocal makeprg=g\+\+\ %\ \-g\ \-std\=c\+\+17\ \-Wall
  133. autocmd FileType haskell setlocal makeprg=ghci\ %
  134. autocmd FileType python setlocal makeprg=python3\ %
  135. autocmd FileType sh setlocal makeprg=%
  136.  
  137. syntax on
  138.  
  139. set shellslash
  140. filetype indent on
  141. let g:tex_flavor='latex'
  142. set sw=4
  143. set iskeyword+=:
  144. "g:Tex_CompileRule_pdf
  145. "g:Tex_CompileRule_dvi = 'latex --interaction=nonstopmode $*'
  146.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement