Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set modelines=0 " CVE-2007-2438
- " Normally we use vim-extensions. If you want true vi-compatibility
- " remove change the following statements
- set nocompatible " Use Vim defaults instead of 100% vi compatibility
- set backspace=2 " more powerful backspacing
- " Don't write backup file if vim is being called by "crontab -e"
- au BufWrite /private/tmp/crontab.* set nowritebackup nobackup
- " Don't write backup file if vim is being called by "chpass"
- au BufWrite /private/etc/pw.* set nowritebackup nobackup
- let skip_defaults_vim=1
- set autoindent
- set ts=4
- set sw=4
- set showcmd
- set showmode
- set clipboard=unnamed
- set mouse=a
- set noswapfile
- set nobackup
- set nocompatible
- set cursorline
- syntax on
- set number
- map <F2> :Explore<CR>
- map <F4> :w<CR>
- map <F3> :bnext<CR>
- map <F5> :IndentLinesToggle<CR>
- map <F9> :call Run()<CR>
- map <F11> :!./%< <
- map <F7> :call Rnjava()<CR>
- func! Rnjava()
- exec "w"
- exec "!javac %"
- endfunc
- func! Run()
- exec "w"
- exec "!g++-13 -O3 -std=gnu++20 -Wall -Wfatal-errors -o %< %"
- endfunc
- func! ST()
- exec "w"
- exec "! ./%<"
- endfunc
- set guifont=Hack\ Nerd\ Font\ Mono\ Italic:h14
- inoremap {<CR> {<CR>}<Esc>O
- inoremap { {}<ESC>i
- set nu
- inoremap <F10> #include <algorithm><CR>#include <iostream><CR>#include <cstring><CR>#include <cmath><CR><CR>typedef long long ll;<CR>typedef long double ld;<CR>typedef unsigned long long ull;<CR><CR>using namespace std;<CR><CR>const int INF = 0x3f3f3f3f;<CR><CR><CR>int main()<CR>{<CR>ios::sync_with_stdio(false);<CR>cin.tie(nullptr);<CR><CR><CR><CR>return 0;<CR><ESC>i}
- inoremap <F12> void setOI(string s){<CR>freopen((s + ".in").c_str(), "r", stdin);<CR>freopen((s + ".out").c_str(), "w", stdout);<CR><ESC>i}<CR>
- set relativenumber
- :inoremap ( ()<ESC>i
- :inoremap ) <c-r>=ClosePair(')')<CR>
- :inoremap [ []<ESC>i
- :inoremap ] <c-r>=ClosePair(']')<CR>
- function! ClosePair(char)
- if getline('.')[col('.') - 1] == a:char
- return "\<Right>"
- else
- return a:char
- endif
- endfunction
- "Plugin
- call plug#begin()
- Plug 'preservim/nerdtree'
- Plug 'tomasiser/vim-code-dark'
- Plug 'vim-airline/vim-airline'
- Plug 'majutsushi/tagbar'
- Plug 'mhinz/vim-startify'
- Plug 'vim-airline/vim-airline-themes'
- Plug 'neoclide/coc.nvim', {'branch': 'release'}
- Plug 'morhetz/gruvbox'
- Plug 'christoomey/vim-tmux-navigator'
- Plug 'tomasiser/vim-code-dark'
- Plug 'letorbi/vim-colors-modern-borland'
- Plug 'doums/darcula'
- Plug 'jacoborus/tender.vim'
- Plug 'sainnhe/gruvbox-material'
- Plug 'joshdick/onedark.vim'
- Plug 'crusoexia/vim-monokai'
- call plug#end()
- set background=dark
- "colorscheme gruvbox-material
- colorscheme onedark
- set termguicolors
- set t_Co=256
- let g:gruvbox_material_background = 'material'
- set laststatus=2
- let g:airline_powerline_fonts = 1
- let g:airline#extensions#tabline#enabled = 1
- nmap <F8> :bd<CR>
- nmap <F6> :CocRestart<CR>
- set hidden
- set updatetime=300
- inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
- \: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
- let g:indentLine_char = '┊'
- augroup VIMRC
- au!
- au BufWritePost .vimrc so %
- augroup END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement